I have a game scene that has two characters with rigidbody and collision. Both of them is moved by keyboard with using rigidbody.movePosition. Now I want to make both of them stop when they collide with each other but don’t know how…
I tried to set one of them to be kinematic, but it only works in one side, when A hit B it works, but when B hit A it won’t work, also clearly that i can;t set them both to kinematic…
“If the rigidbody has isKinematic set false then it works differently. It works like transform.position=newPosition and teleports the object (rather than a smooth transition).”
It seems to still move when you set it to isKinematic, so you may have to do something like inform the component that contains the keyboard conditions and tell it to stop checking for if a key is held down or something similar to that.
I haven’t tested any of this out, but I’ll have a go later today if it doesn’t work out for you, good luck!