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:
and it works very well. Is there a way to do it with torque?
Thanks a lot.
Jose Ricardo
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