# I need help with collisions between cars in my car racing game! HELP ME PLEASE!

**URL:** <https://forum.kirupa.com/t/i-need-help-with-collisions-between-cars-in-my-car-racing-game-help-me-please/15937>\
**Category:** Uncategorized\
**Created:** [March 19, 2003, 4:30pm UTC](https://forum.kirupa.com/t/i-need-help-with-collisions-between-cars-in-my-car-racing-game-help-me-please/15937 "2003-03-19T16:30:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![joaomgb](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@joaomgb](https://forum.kirupa.com/u/joaomgb)\
**Post date:** [March 19, 2003, 4:30pm UTC](https://forum.kirupa.com/t/i-need-help-with-collisions-between-cars-in-my-car-racing-game-help-me-please/15937/1 "2003-03-19T16:30:24Z")

</div>

Hi! I am making a car racing game in Flash MX. Unfortunately I don’t know (and I’ve already searched a lot!) how to do a realistic car collision. Can you help me please? It’s urgent!!! Send an e-mail to joaomgb@sapo.pt if you have a sollution or know a website with the sollution please.

PS.: I am Portuguese. You help me too, don’t you? (if you see any mistakes in this page you must understand…) DON’T IGNORE ME PLEASE!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 19, 2003, 6:08pm UTC](https://forum.kirupa.com/t/i-need-help-with-collisions-between-cars-in-my-car-racing-game-help-me-please/15937/2 "2003-03-19T18:08:24Z")

</div>

what do you mean by realistic ?  
i think you should use the hitTest function between 2 movie clips and set a specific action when they do collide…

Could you be a bit more sepcific about your project?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 19, 2003, 7:40pm UTC](https://forum.kirupa.com/t/i-need-help-with-collisions-between-cars-in-my-car-racing-game-help-me-please/15937/3 "2003-03-19T19:40:28Z")

</div>

OK. Go to “[http://outsideofsociety.idz.net/](http://outsideofsociety.idz.net/)”, “examples” section and view the “MTV Car game” (in the “other stuff” sub-section). Pay attention to the collisions between the two cars and you will know what I want. If you know how to do a collision like that SAY ME PLEASE.  
Thank you.  
João

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 19, 2003, 7:53pm UTC](https://forum.kirupa.com/t/i-need-help-with-collisions-between-cars-in-my-car-racing-game-help-me-please/15937/4 "2003-03-19T19:53:55Z")

</div>

hoho i must say this is much beyond my level of action scripting, although there are some keypoints:

- the arrows are listened to and they either increment or keep a variable which will accelerate the car…
- the trajectory is most probably calculated using the rotation of the car, the acceleration vector and the sin and cos of these values…
- the bumping system is then calculated with a hitTest value (on the bumper for example) -and i think what happens is that the previous position of the car (ie before the bump) is used to create the bump effect… I dont really know how to handle bumping in Flash, but there must be a tutorial on that on either kirupa or the web…

Good luck !
