Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Collision between rect and vertexarray

This topic is 5677 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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!

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!