Skip to content

Freedom of motion #167

Answered by PhoenixIllusion
LeXXik asked this question in Q&A
May 22, 2024 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

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

None			= 0b000000,									///< No degrees of freedom are allowed. Note that this is not valid and will crash. Use a static body instead.
All			= 0b111111,									///< All degrees of freedom are allowed
TranslationX		= 0b000001,									///< Body can move in world space X …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@LeXXik
Comment options

@jrouwe
Comment options

Answer selected by LeXXik
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants