I made a game once with a bouncing ball. I had the same problem with checking which side the collision took place.
I solved it with a function in windows called intersectrect. Don''t know exactly what it was called but I think its what you need.
How to detect what side of an object you collide with.
Your right...
just tryin to help![](wink.gif)
NitroSR seems to have it...I''ll have to remember that one...
Jenison
''There is no reason to have math part of the curriculum in schools. Why should we have to know 2x = 3y - 5. We have computers now." - Rosie O''Donnle
just tryin to help
![](wink.gif)
NitroSR seems to have it...I''ll have to remember that one...
Jenison
''There is no reason to have math part of the curriculum in schools. Why should we have to know 2x = 3y - 5. We have computers now." - Rosie O''Donnle
You could always use colormaps.
A nonvisible copy of your scene with colored areas instead of
there the actual tiles would be.
Then put a green area for the top of the tiles,
Red for the sides, yellow for sliding right and so on.
A 256 color bitmap would give you 256 different reactions to
your Mario character depending of which color he comes in contact with.
Then just get the pixelcolor at the specific coordinate
I have used this method since my Amiga days, it works for me.
A nonvisible copy of your scene with colored areas instead of
there the actual tiles would be.
Then put a green area for the top of the tiles,
Red for the sides, yellow for sliding right and so on.
A 256 color bitmap would give you 256 different reactions to
your Mario character depending of which color he comes in contact with.
Then just get the pixelcolor at the specific coordinate
I have used this method since my Amiga days, it works for me.
<-Sweenie->
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement