Strange behaviour of kinematic (not updating visually)

Night Elf

29-08-2007 16:43:35

I'm creating a kinematic object with the following code:

nxBody = g_nxScene->createBody(
meshName,
new NxOgre::TriangleMeshShape(meshName),
NxOgre::Pose(position, orientation),
"kinematic: yes");


Then I move the object using nxBody->setGlobalPosition(position).

The problem is I can see the object moving just fine in the remote debugger, but it's not visually moving in my scene. Then, when I touch with my character the object (in its real position as shown in the debugger), the graphics update.

What am I doing wrong?

EDIT:
Actually, it appears as if the door moves visually only when my character is close to it. Do kinematic objects have some sort of bounding radius or something that... "activates" them. I can see in the debugger that when I approach a kinematic object it changes colour...

betajaen

29-08-2007 17:30:01

Sounds like a bug with NxActiveTransform, or PhysX being a bit to conservative of what's moved and what hasn't. Either way nothing I can't fix.

You could sneakily add a "actor->render(0)" after you've moved your kinematic actor though.

Night Elf

29-08-2007 18:30:08

Thanks, calling render(0) does the trick.