Mesh versus Physic object sizes..

Conor

10-03-2008 13:44:59

Ok.. im trying to create a rope from a series of connected capsules.. in the remote debugger the physics is working correctly however the meshes I apply do not correspond to the actual capsule..

im using
m_Body = m_Scene->createBody("rope2; rope.mesh",new CapsuleShape(2,5),NxOgre::Pose(Vector3(-50,192.5,500)),"mass: 10");

now both the mesh and the cylinder should be the same size but it appears to me that the actual mesh is being applied at the center point of the cylinder giving weird looking results..

I'm using 3ds and lexiexporter I've tried moving the object in 3ds before exporting but this seems to have little to no effect.

Any ideas?

P.S. Are all physics objects dimensions related to center of gravity for example capsuleshape(2,5) creates a cylinder with radius 2 but over height of 10.

betajaen

10-03-2008 14:13:58

The total height of a capsule is height + 2xradius, and the total width of a capsule is radius.

Conor

10-03-2008 14:57:15

ok but any idea why the mesh is linked to the center point of the cylinder.. or how i fix it?

i.e.

(-----|MESH|)

when i want
(MESH)

betajaen

10-03-2008 14:58:23

The center of the mesh is offset to the right. Try running it through MeshMagick.

reptor

10-03-2008 15:21:09

The total height of a capsule is height + 2xradius, and the total width of a capsule is radius.

"total width of a capsule is radius"

should that not be "The total width of a capsule is its diameter" ?

:shock:

betajaen

10-03-2008 15:29:04

Yes, thanks for capturing that one.

NickM

10-03-2008 20:14:23

Make sure the pivot in 3ds is centrallised, from memory, go to the hiararcy tab, select effect pivot only, then click centralize to object or something similar.