character controller position doesn't change

foxbat

09-07-2006 05:57:08

Hi. I've added some code to the character controller to return its position with:

mController->getPosition().

However, this only seems to return the creation position of the controller, and never anything else, even though the character has moved. I noticed that in the character controller code, mController->getActor()->getGlobalPosition() is used instead, but this is slightly inaccurate due to the delay caused by the simulation rate. Is there any reason why mController->getPosition() fails to work?

Judging by the novodex documentation, all that seems necessary is to move the controller with move(), and then its position can be determined with getPosition(). This, however, does not appear to work in NxOgre.

betajaen

09-07-2006 09:31:06

Hmmm....

It says use controller->getPosition() in the PhysX SDK?

I have noticed this before, and just thought you would need to get it from the actor instead. I'll look into it though.

foxbat

10-07-2006 05:21:57

This is from the 2.3.2 sdk under Guide - character controller:



Graphics update
Each frame, you need to keep your graphics object in sync with the position of the character controller. A controller never rotates so you can only access its position. This is easily done using:

const NxVec3& NxController::getPosition()const;


Perhaps this is a question for ageia support?