How to dynamically change body_mass #453
Replies: 1 comment 8 replies
-
Inertia is a 3-vector.
|
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I need to keep changing some objects' mass in the run time.
I find the following variable may be relevant:
physics.model.body_mass
physics.model.body_inertia
But when I changed it, I find the behavior of the object doesn't change at all (in some way).
Here is a minimal code that can reproduce the problem.
In the model(xml), one box is pretty heavy, and another box is trying to push it.
Even after I change the body mass to 0, it is still unable to be pushed.
But in some other way, the mass is actually changed! Because if you set the initial pos of box1 to be pos="0 0 0", it will keep flying upward.
Beta Was this translation helpful? Give feedback.
All reactions