How to adjust the shape's position,orientation in a body?

Immoho

02-01-2008 06:21:36

Hi

mBoxShape = new NxOgre::CubeShape(50.0f);
mSphereShape = new NxOgre::SphereShape(100.0f);
mConvexBody = mScene->createBody("ogrehead.mesh",new CompoundShape(mBoxShape,mSphereShape),Vector3(400,60,30),"mass:10");

I found that they have the same mass center.
U know,in the PhysX's ,the actor has a global position and a local position,
the local position is used to adjust the body or character's position,orientation relative to the actor's.
How can I adjust the position between the mBoxShape and mSphereShape?
Thanks.

betajaen

02-01-2008 10:44:04

The ShapeParams.

mBoxShape = new CubeShape(50, "offset: 1 0 0");

Immoho

03-01-2008 11:02:14

Thanks.