I'm developing an RPG (try nr .7) and i want to make my collision detection code better. Right now it checks if the locations of the given rectangle's corners is black on my collision map. If so it returns true, else false. It's very quick but it leaves me with a problem. If one of the sides of the rectangle is bigger then a object on the collision map it goes trough it. I was thinking of checking every pixel on the 4 edges of my rectangle, that should make it more 'waterproof'. But i'm afraid that it will get really slow on big rectangles. Is there an alternative?
Thanks in regards
Pontus
This post has been edited by manhaeve5: 10 June 2008 - 09:54 AM

New Topic/Question
Reply




MultiQuote




|