-
Notifications
You must be signed in to change notification settings - Fork 191
Description
Greet you!
"Constraint.impulse" in Python returns just a positive magnitude. This seems to be confirmed also by joint implementation code at, for example...
https://github.com/viblo/Munk2D/blob/master/src/cpPivotJoint.c#L76
For each joint type, it returns either of...
cpvlength(joint->jAcc)cpfabs(joint->jAcc)
How to obtain information about the direction of an impulse applied by a constraint?
If such information is not accessible, perhaps it would be possible to expose it.
For a logical interface, the result could be in the frame of reference of the constraint's axes of acting or degrees of (non-)freedom ( determined by anchor points for some constraints ). There could be separate properties for pushing-pulling and lateral impulse components or one returning a vector.
However, it seems that simply exposing joint->jAcc if it is in some other frame of reference ( like relative to the space ), so that it could be transformed manually, would still be better than this information not being obtainable at all.
Best wishes!