- Home /
Question by
taxvi · Oct 27, 2015 at 08:52 AM ·
collisionrigidbodymovepositionrigidbody-collision
Rigidbody slightly intrudes another one while pushing it
I'm moving a rigidbody and it pushes other rigidbodies out of the way. this is my code:
_rigidbody.MovePosition(_rigidbody.position + velocity * Time.fixedDeltaTime);
pretty standard. but as a result the rigidbodies slightly intrude one another while pushing:
in the documentation they say not to use .velocity because it will lead to unrealistic physics simulation
any thoughts how can I fix this?
screen-shot-2015-10-27-at-124003-pm.png
(24.5 kB)
Comment
p.s. rigidbody.velocity actually does lead to weird stuff - tested
Answer by GiyomuGames · Oct 27, 2015 at 09:00 AM
Have you tried putting the detection mode to "continuous" on the rigid body of the green object? http://docs.unity3d.com/ScriptReference/CollisionDetectionMode.Continuous.html
yeap - both continuous and continuous-dynamic have the same effect :/