Jump to content
  • Advertisement
Sign in to follow this  
manunderground

Collision Response

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

Hey, I've been using various resources from Gamedev and others to build a collision detection system for 2d space. In a nutshell I use AABB's and a grid to handle broad phase detection. However, I'm stuck on the next step and was hoping y'all could lend a hand. Specifically, I would like to find the point of intersection, depth of penetration, and normal for a collision between, say, two rectangles (I'll worry about other shapes later). I can't seem to find any resources which go into the nuts and bolts of this step, but I also can't figure it out myself. Can someone help me out? Thanks!

Share this post


Link to post
Share on other sites
Advertisement
These guys did a great job explaining how they implemented 2D colision in their game (called N):

http://www.harveycartel.org/metanet/tutorials.html

Share this post


Link to post
Share on other sites
Thanks a lot for the reply! I am actually using that article already but I find they don't go into the math for determining the collision normal, penetration, etc. I do recommend the article, though, for anyone who is just starting out on collision detection.

Share this post


Link to post
Share on other sites
There is one thing mentioned in the first tutorial by N guys. When a object is pushed out of other object, it is moved to the direction that requires smallest displacement. Sometimes the direction can be wrong - this is also mentioned in this section of the first N tutorial.

What I'm interested in, is that is this common "incorrect" feature in physics engines that are used for games?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!