- Home /
Question by
reactle · Jun 27, 2020 at 08:39 AM ·
rigidbodyrigidbody-collision
Add extra force on collision based on speed on rigidbodies colliding
I'm writing a racing game. The vehicles are the same mass.
One of the ideas in the game is that you try to ram the other car off the road. At the moment when they collide they will push the other car a bit, but I'm wanting whichever car hits the other the hardest will push the other car in the direction they were hit.
I've tried adding force in onCollisionEnteted but I'm not sure how to add the force at different rates depending on which car hit the hardest.
Comment