Character rotation

josericardo_jr

10-10-2006 14:34:28

Hi,

I'm using Ogrenewt (Thanks Walaber! This is very helpful!) to move me character using addForce. It works well but now I need to change my character's orientation. When I use setOmega, it works but I want to do it using addTorque because in my opinion, it's the right way to do it. I don't understand how to do it. What means the vector3 in this function and how can I calculate the torque I need to get to a desired orientation? If I use getOmega, what this vector3 returned by this function could help me? If possible someone could show me a code that do a rotation using addTorque?

In my character movement I use this:


F = mass * ( ( desiredVelocity - currentVelocity ) / time )


and it works very well. Is there a way to do it with torque?

Thanks a lot.

Jose Ricardo

Nudel

10-10-2006 17:05:16

a code snipet of how to rotate a character with torque has been posted by walaber. try to search his posts for keywords like character and addtorque.

edit:
wanted to take a look on the code myself too again so i did the search. heres the link:
http://www.ogre3d.org/phpBB2addons/view ... =addtorque