Jump to content
  • Advertisement
Sign in to follow this  

collision process

This topic is 4741 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 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!