Jump to content
  • Advertisement
Sign in to follow this  

AABB vs Sphere Collision Handling and Response

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

Ok, I've got collision response figured out for sphere vs sphere stuff. Find the differing vector and back them up so they no longer overlap... and then I'm free to do whatever bounce-friction-goofiness I feel like. Even a sphere vs a line-wall is easy to figure out. BUT, I'm having some serious issues with AABB vs Sphere (and AABB vs AABB for that matter) collision handling. I can detect a collision no problem, but can't seem to back the objects out of each other correctly (the vector length from center point to center point changes for every direction since it's a cube instead of a sphere). What's an easy (and optimal) way to handle this? Please use code snippets to help explain the answer, and please don't use the word "simply," as I've learned that it's the "simply" part that I'm usually missing. ;) Any help is appreciated though!

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!