Hi everyone!
How to make body (Rigidbody) not lose their energy in collisions with other body? (2D physics)
Hi,
some hacks that I’d try if possible in your case;
-
make it kinematic, then move it by rigidBody2D.MovePosition,
-
Or by modifying transform.position (this is not recommended I guess?)
-
Or make it have large mass, and make other objects have very small mass compared to it.
Unfortunately - no. Small object “A” faces a large “M, D, C” (all have a component rigidbody). And the object “А” should not lose energy.
In 3d, the material Zero friction is available. Is this available too in 2d?
It does not help… Unity - Manual: Physics Material 2D
The only thing I know - it’s apply additional force to the object equal to the energy lost, but this is wrong, because it is necessary to count.
DxStd_IgnatPribylov: Probably depends on what you are doing, my point was that by moving object that is kinematic, you can move it either by physics system or transform and it still collides with other physics object, but their weight / collision won’t slow down moving/colliding object.
But I’ve got no idea what you are doing, so I was only making my best guess.
And if there is no loss of movement speed, the result is same as moving object using constant velocity or something similar.