Skip to content

Question about joint constraints and physics bodies. #933

Answered by jrouwe
venumspyder asked this question in Q&A
Discussion options

You must be logged in to vote

Instead of:

RotatedTranslatedShapeSettings(Vec3 (0.1f, 0.21f, -0.04f), QuatArg inRotation, capsule_shape);

you need:

RotatedTranslatedShapeSettings(Vec3(0.1f, 0.21f, -0.04f) - Vec3(0.0934882f, 0.332284f, 0.0f), Quat::sIdentity(), capsule_shape);

You want to translate the shape so that if you place the body on the joint position that the capsule is in the right position.

Replies: 4 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@venumspyder
Comment options

Answer selected by venumspyder
Comment options

You must be logged in to vote
1 reply
@jrouwe
Comment options

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