Hello,
When using Hinge constraint and enableAngularMotor, how can I know the torque that is applied by the motor?
Looks like getAppliedImpulse() is not what I want (for example, it returns non-0 values even if the motor is disabled)
Thank you
Gregwar
Applied torque by angular motor?
-
- Posts: 463
- Joined: Fri Nov 30, 2012 4:50 am
Re: Applied torque by angular motor?
Have you tried using btJointFeedback ?
-
- Posts: 11
- Joined: Mon Nov 16, 2015 6:27 pm
Re: Applied torque by angular motor?
Actually, getJointFeedback returns always NULL, even when calling enableFeedback(true) on the hinge
Do I need to do something more?
Do I need to do something more?
-
- Posts: 11
- Joined: Mon Nov 16, 2015 6:27 pm
Re: Applied torque by angular motor?
OK, I figured out that I actually need to instanciate the feedback and pass it to my constraint:
Code: Select all
auto fb = new btJointFeedback();
hinge->setJointFeedback(fb);
-
- Posts: 11
- Joined: Mon Nov 16, 2015 6:27 pm
Re: Applied torque by angular motor?
However, this still returns both the torque applied by the motor and other values, I think that corresponds to the hinge constraint itself