Sign in to follow this  

Collision Response

This topic is 4417 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 implemented the article on http://www.gamedev.net/reference/articles/article1026.asp and it detects collisions great, but it doesnt slide at all, it always registers as being stuck when i hit a wall and just returns me to the last same position and skips the rest of the response code. Is there something im missing here? If in the collision.stuck part of the response it add something like: velocity = PolygonNormal - velocity Then i slide pretty decently however when i add gravity i just constantly slide all the way down a plane until i hit one that is horizontal and its somewhat jerky too. Any help would be much appreciated, i been trying to fix this, researching other algorithms to detech collision and this seems to be the easiest one to get working properly and implement aside from this small subtlety. Thanks again!

Share this post


Link to post
Share on other sites
This paper, I believe, improves on and addresses some problems in Nettle's paper, so if you're working on ellipsoid collision detection and response I'd use the former rather than the latter as a reference. (Although perhaps the Nettle paper has been updated...I'm not sure.)

Share this post


Link to post
Share on other sites
you get stuck usually because of intersections. to circumvent that, you need to push your object away from the intersection, in the direction of the intersection. This is usually refered as the MTD (minimum translation distance). Adding normal to velocity won't be enough, and will give you bogus results.

Some system 'guarantee' you will never intersect (Quake style collision, where everything is translated, and with careful tolerances). But, as for me, I prefer to deal with intersections, as well as normal collisions.

here is an example. It's using spheres, but you should know already how to convert sphere collisions to ellipsoid collisions. I use a slightly different method for the detection, more brute force. I don't think his original method is entirely reliable.

Share this post


Link to post
Share on other sites
I dont quite understand? How do i push an object away from the intersection in the direction of the intersection?

The demo you have there looks good but it seems theres a lot going on there and kind of overwhelming to take in, particually when im used to using a system like those explained in the ellipsoid papers. I seem to be able to grasp that easier, and being a beginner at this type of math programming it makes it easier to understand.

But when it doesnt work, and I dont understand why, even after stepping through code for hours and hours, debugging and what not, it starts to get a little annoying.

I mean, I'm not using an advanced map or anything, even a normal plane, where just x and z change, no height in it at all, i still get stuck on it.

Share this post


Link to post
Share on other sites

This topic is 4417 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this