I want to know is it possible to change a rigibody’s mass ‘on the fly’ without any side effect?
I was simulating a rigidbody gradually losing its mass in the BGE, but when the obj’s mass is changed in a script, it seems the obj’s acceleration of gravity changed as well.
I made a blend file to demonstrate this problem.
In the file a script is attached to Cube2 to change its mass, and you can see its motion is very different with Cube1, I don’t know what’s wrong here, can anyone explain this?
Yes you’re right! My test shows that the difference shows up right after the second mass change, and it becomes more and more obvious ever since.
I did the test in both v2.62 & 2.63.
It seems to only be for gravity, as in my game with no gravity it works perfectly. It may be a bug with recalculating the required force? In which case changing and then unchanging gravity for a frame may solve it.