Jump to content
  • Advertisement
Sign in to follow this  

Capsule vs AABB and OBB intersection

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

Hi there,

 

I am struggling with my implementation of a Capsule surrounding the character and collisions versus AABBs and OBBs.

The problem I have, that I cannot figure out how to deal with this. 

I already implemented Capsule vs Sphere which is quite easy (Point vs Segment). But vs a Box I do not have a constant value like the radius.

 

What I did so far:

- find the nearest point on the segment to the center of the box (dunno if this is useful at all)

- detect collision (which is more or less just a box vs box test)

 

- I thought about Seperating Axis Theorem, but doesn't it only work on boxes or not round objects?

 

Hoping for a push in the right direction :)

 

Thanks.

Share this post


Link to post
Share on other sites
Advertisement

Haha I don't know why, but after posting this I cam up with a solution :)

 

I first find the nearest point on the segment from there I treat the check like a sphere vs box collision.

Share this post


Link to post
Share on other sites

Haha I don't know why, but after posting this I cam up with a solution smile.png

 

I first find the nearest point on the segment from there I treat the check like a sphere vs box collision.

 

That happens to me sometimes. There must be something about explaining the problem that helps you find the solution.

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!