Djoef
15-09-2008 18:55:55
Hi,
I got NxOgre & PhysX installed and want to move a character.
Problem is that I read different ways to do that on the forum.
Please could someone tell me what is the correct way ?
1) moving forward / backward
In Ogre I tried it do do it this way :
How should I get the joystick-value integrated so the speed is influenced ?
2) turning
Seems to do well, but I'm unsure if that is the "right" way to do it.
Thank you !
I got NxOgre & PhysX installed and want to move a character.
Problem is that I read different ways to do that on the forum.
Please could someone tell me what is the correct way ?
1) moving forward / backward
mSubject->addMovement(NxOgre::Character::DR_Forward);
Seems to be working, but I would like to make the speed depend on the joystick axis value.In Ogre I tried it do do it this way :
camNode->translate(camNode->getOrientation()*Ogre::Vector3(0,0,joy.mAxes[2].abs/32000.0));
How should I get the joystick-value integrated so the speed is influenced ?
2) turning
camNode->yaw(Ogre::Degree(-joy.mAxes[2].abs/5000));
mSubject->setDirection(camNode->getOrientation());
Seems to do well, but I'm unsure if that is the "right" way to do it.
Thank you !