PDA

View Full Version : Collistion Response for Car Game


andrewcharon
12-27-2006, 02:03 AM
Hi

I'm building a 2D car game and it's close to done, however I'm trying to figure out the best way to do a collision detect and response for two cars when they overlap. I'd like them to somehow bounce off of each other (react appropriately) instead of the movieClips overlapping. I posted my progress. If anyone has any suggestions of the best way of doing this or an online resource/tutorial it would be greatly appreciated. My progress is here:
http://www.andrewcharon.net/3m/auto.html

Thanks in advance for your help.

Andrew

**Here is a link to a game where the collision response is similar to what I'm looking for:
http://www.freeloader.com/content/freeloader/en/games/bob/?fl_bob_phase=download;fl_bob_cid=311;fl_bob_dcate gory=1

inhan
12-27-2006, 03:33 AM
From gskinner (http://www.gskinner.com/blog/archives/2005/10/source_code_sha.html)...

terbooter
12-27-2006, 03:45 AM
andrewcharon, nice game! Keep going the same way!

Why you are not satisfied with two MC
boundary collision? Your cars have good rectangle shape.

But if you want more accurancy, you may use point-shape collision

The idea: You mark key points of your cars and chek if
any of this point colliding with shape of other car

In attacment idea of realization

andrewcharon
12-27-2006, 12:39 PM
I am satisfied with the boundary collision, however I'm not satisfied with the car to car collision (or lack of).

My big challenge I have is once I set the detection, how do I take this to the next step to create an appropriate reaction from the collision when one car hits the other car.

Thanks