PROBLEM APPLYING TORQUE TO RIGID BODY

vheights
Posts: 2
Joined: Mon Jan 17, 2011 4:54 pm

PROBLEM APPLYING TORQUE TO RIGID BODY

Post by vheights »

Hi All,

I know what I am asking is very trivial but I am not able to implement it. The Problem is that
I have made a rigid body, I have applied forces and impulses to it and the body is behaving
fine. But when it comes to the applying torque and angular impulse, there seems to be no motion.

I am using

body->applyTorque(btVector T);

Am I making any mistake or there are some other parameters which I need to adjust before applying
Torque. Can't I apply torque If the body is not fixed, Lets say at the joints of a biped robot during walking.

I have searched a lot about it and I am not able to find the solution.

Thanx in Advance..

Sandeep
winspear
Posts: 77
Joined: Thu Nov 26, 2009 6:32 pm

Re: PROBLEM APPLYING TORQUE TO RIGID BODY

Post by winspear »

Applying torque itself should work fine since I used it a couple of times. Just make sure that the object is not constrained in a way such that applying torque would produce no result. Maybe the torques are not scaled properly.

PD: applyTorque function works just fine on primitives like boxes, cylinders,spheres etc.
vheights
Posts: 2
Joined: Mon Jan 17, 2011 4:54 pm

Re: PROBLEM APPLYING TORQUE TO RIGID BODY

Post by vheights »

I am applying it to a sphere. Actually I have to apply it on a hinge joint of a biped mechanism. I have made the complete model but I am unable to apply torques.
Si I decided to apply it on a sphere. I also tried large values but with no success. I think I am missing some thing.
winspear
Posts: 77
Joined: Thu Nov 26, 2009 6:32 pm

Re: PROBLEM APPLYING TORQUE TO RIGID BODY

Post by winspear »

Try setting the sphere active before applying the torque. Maybe the sphere just went to sleep automatically based on how you setup the physics engine.