Sign in to follow this  
derek7

collision process

Recommended Posts

I get position of a object of last and current frame .then get a ray.detect the ray and wall. if intersect, get the point of intersect.and then move the corner of object to the point. this is my collision process.but I am afraid something wrong will happen because of float error. so maybe I move my object to the point of intersect, and the object could slightly penetrate the wall because of float error.so this will affect successive calculating and then will create error.

Share this post


Link to post
Share on other sites
Numerical error is almost inevitable in collision detection, and you have to find ways to work around it. A common solution to the problem you describe is to not move the object all the way to the contact point, but rather just short by some small distance. Even then, you may encounter problems elsewhere. The fact is that implementing collision detection robustly can be quite difficult.

Share this post


Link to post
Share on other sites

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