Freedom of motion #167
-
In Ammo there is a linear and angular factors, which specify a factor that is multiplied per axis. For example linear factor of [1, 0, 1] means that the body is allowed to move on X and Z, but not on Y. An angular factor of [0, 1, 0] would mean the body can only rotate on Y axis. What would be the way to achieve similar functionality in Jolt? There is a degree of freedom setting on the body, which is using one of the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
The EAllowedDOF is defined as a 6-bit-flag that has both 3-bits of rotation and 3-bits of translation. Is that what you are referring to, or is this not accomplishing what you are attempting? const translationXZ_rotationY = EAllowedDOFs_TranslationX | EAllowedDOFs_TranslationZ | EAllowedDOFs_RotationY
|
Beta Was this translation helpful? Give feedback.
The EAllowedDOF is defined as a 6-bit-flag that has both 3-bits of rotation and 3-bits of translation.
Is that what you are referring to, or is this not accomplishing what you are attempting?
const translationXZ_rotationY = EAllowedDOFs_TranslationX | EAllowedDOFs_TranslationZ | EAllowedDOFs_RotationY
https://github.com/jrouwe/JoltPhysics/blob/7edba88d5336047ebae8c6e26a5aa89dd5ae069e/Jolt/Physics/Body/AllowedDOFs.h#L10