You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to get the reaction force and torque out of a joint to determine if I should remove the joint (creating "breakable" joints).
I'm not sure if this code in Planck is correct:
RevoluteJoint.prototype.getReactionForce = function(inv_dt) {
var P = Vec2.neo(this.m_impulse.x, this.m_impulse.y);
return inv_dt * P;
};
P is an object with x and y properties, and then the object is multiplied by a number? This returns NaN. Should it be p.mul(inv_dt) instead so the multiplication works correctly?
Thanks!
The text was updated successfully, but these errors were encountered:
Hey,
Trying to get the reaction force and torque out of a joint to determine if I should remove the joint (creating "breakable" joints).
I'm not sure if this code in Planck is correct:
RevoluteJoint.prototype.getReactionForce = function(inv_dt) {
var P = Vec2.neo(this.m_impulse.x, this.m_impulse.y);
return inv_dt * P;
};
P is an object with x and y properties, and then the object is multiplied by a number? This returns NaN. Should it be p.mul(inv_dt) instead so the multiplication works correctly?
Thanks!
The text was updated successfully, but these errors were encountered: