Skip to content

Force center-of-mass to body origin? #176

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

You must be logged in to vote

Jolt indeed automatically calculates the center of mass for any created shape. If you want to force the center of mass to the origin you can use the OffsetCenterOfMassShape to do so, you'd create one with:

my_new_shape = new OffsetCenterOfMassShape(-my_original_shape->GetCenterOfMass(), my_original_shape)

Replies: 2 comments 2 replies

Comment options

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

Answer selected by DocAce
Comment options

You must be logged in to vote
1 reply
@DocAce
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