Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recalculate COM of a Composite body #1296

Open
SrivamsiMalladi opened this issue May 27, 2024 · 0 comments
Open

Recalculate COM of a Composite body #1296

SrivamsiMalladi opened this issue May 27, 2024 · 0 comments

Comments

@SrivamsiMalladi
Copy link

I am trying to build a simulation similar to a see-saw, to see how changing weight on each side changes the angle of the beam.
I have sliders that change the weights of the bodies on the either side of the beam. I linked the value of the slider to the density of the bodies on either side of the beam.
When I move the slider, I see that the mass of the corresponding body changes when I log it in the console.
What does does not change is the center of mass of the whole See-Saw compound body (which contains the two weighted bodies on either side of the beam), because of which the beam does not move (the angle of the beam does not change) when the weight on one side is greater than the other side.

I read in #684 that the COM is only calculated once. Is there a way to update it when the weights change dynamically during run-time, like in my case?

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant