Skip to main content
GameDev.net gamedev.net
🔒 Locked

Collision between rect and vertexarray

Started by lexor Nov 4, 2002 at 5:38 AM 0 replies 450+ views
Original Post
lexor
lexor
Hi everyone! Im trying to do a colisiondetection for my 2d-game, but I cant seem to figure out how to do the math Guess I should have paid more attention in my math-classes. I have an array of vertexpoints mapped out to fit the borders of the landscape. The main character only needs a RECT type of boundingbbox. How do I calculate if a collision appears? (that is when the character tries to walk on the (invisible) lines between the vertexpoints) The main character is trapped in the irregular shape made up by vertexpoints so there is a limitation in all directions. I''ve done alot of thinkin about this and this is the only method that could do the job with a good speed. Thanks in advance!
_______ www.leXor.net

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.