Jump to content
  • Advertisement


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


Collision between rect and vertexarray

This topic is 5855 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

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!