collision detection
- Posted by craig stretch <wonderpage at thefreeinternet.co.uk> Dec 27, 2000
- 582 views
i'm studying how to detect overlaps or collisions of two graphical objects. For example i have a vertical scrolling screen with a path free of any pixels that an object can pass without touching the sides of. Such as an animation of a vertical scrolling road with embankments, the path of the road is the set background color. I want to be able to detect when the car touches the sides or embankments of the road. I am at the stage where i am able to design scrolling bitmaps for the design of the road. I am unsure however about the way to handle the detection of the vehicle should it touch the sides of the road if the game player should make an error when controlling the car. I hope to use a sprite library for the vehicle but is there a library routine that can handle the detection of the overlap/collision of the bitmap image of the road and the car sprite. cheers, craig