hushhush
09-06-2009 16:01:10
Hello !
I'm actually coding a game, and i want to move my charater in a closed world.
I set all friction and restitution to ZERO (else he stamble). But when it hit a wall, the character bounce.
If someone knows how to change it, and if they are other things to know for move corectly a character
that's the code i use to move it:
and this for friction and restitution
I'm actually coding a game, and i want to move my charater in a closed world.
I set all friction and restitution to ZERO (else he stamble). But when it hit a wall, the character bounce.
If someone knows how to change it, and if they are other things to know for move corectly a character
that's the code i use to move it:
NxOgre::Real3 r;
r.x = pos.x;
r.y = pos.y;
r.z = pos.z;
this->body->addForce(r, NxOgre::Enums::ForceMode_Impulse);
and this for friction and restitution
this->nxScene->getMaterial(0)->setStaticFriction(0.0f);
this->nxScene->getMaterial(0)->setDynamicFriction(0.0f);
this->nxScene->getMaterial(0)->setRestitution(0.f);