how to create body with the exact shape(size) of mesh?

caifie

18-05-2010 04:57:35

hi!

in my app, i need get the exact shape(size) of mesh to create body.
in nxogre1.6, i noticed there may be two method to set the shape to create body,

1. set the absolute vec3 size,
this mehtod have some problem like, if shape size is seted biger than mesh, the mesh will float above the floor;
if shape size is seted smaller than mesh, the mesh will run into other mesh.

2. via NxOgre::Mesh to load the nxs mesh, and then get its shape to create body.
this method looks like get the exact shape of mesh, but the shape can not scale in app. so it will be short of flexibility.

so how can we create the body with the exact shape of mesh, and be more flexible like scaling it.

thanks!

betajaen

18-05-2010 09:50:15

Either 1 or 2.