Jump to content
  • Advertisement
Sign in to follow this  
THACO

Line Ellipse collision in 2D

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

I have been trying to do line ellipse collision in 2D with some help of the article below. http://www.gamedev.net/reference/articles/article1026.asp So I have the line and its normal. I normalize the normal then I multiple it by the ellipse radii. This should give me the collision point where the line would collide with the ellipse? but it doesn't, the pictures below show this, one is before I compenstate for the collision, and the second is the compensation, you can still see a collision. The only time the collision works is if it is at 0,90,180 or 270 degrees. It also works fine if I have the ellipse a circle. I hope I am explaining this correctly collision used to detect the collision point http://img122.imageshack.us/my.php?image=1hh0.jpg supposed resolved collision http://img243.imageshack.us/my.php?image=2tn3.jpg I assume I must be calculating the collision point for ellipse incorrectly, but I don't know how that could be, it seems simple 1. take the normal of the line segment 2. normalize said normal 3. multiple the normal by the ellipse radii 4. that point is how far I must move the ellipse to resolve the collision Thanks for any and all input -Matt

Share this post


Link to post
Share on other sites
Advertisement
I don't know exactly what the cause of the problem is, but I'll just mention that the algorithm described in the article you linked to is known to have some issues. There's a follow-up paper by Kasper Fauerby called "Improved Collision Detection and Response Using Ellipsoids" (or something like that) that you might want to look into instead.

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.

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!