- Home /
Car Collision response - small collision
When 2 car collide, as soon as I detect collision occurs, my code compute:
1, result velocity of both cars, using elastic collision equation
2, solve the penetration along the normal of collision
Result is okay. Only I see the car been collided moves small distance, but I need bigger one (like the game Asphat by gameloft, if you crash a npc car, that car moves far forward at the collision time), any suggestion?
So you are using the law of impulse? Just trying to understand the setup. Then you maybe could increase the mass of the car that collide from behind, or something? You could use a trigger on the cars for setting the mass property, maybe. So if the car collides from behind it has a greater mass, but only at that particular event.
Answer by sambsp · Jun 07, 2012 at 01:30 AM
Fattie,
The only reason is I want to build the wheel from scratch since I want to know the trick behind physics engine.
Answer by sambsp · Jun 07, 2012 at 01:31 AM
bompi88,
Thanks, it's a good point. I'll try. Just still want to know what most of the car game do in such a situation.
Your answer
![](https://koobas.hobune.stream/wayback/20220613072431im_/https://answers.unity.com/themes/thub/images/avi.jpg)