Jump to content
  • Advertisement
Sign in to follow this  
timj88

sphere position during collision

This topic is 1821 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 everyone,

I have a small problem I hope you can help me :)

I have a sphere and some walls, I need to place the sphere as close as possible (so like the collision happen) to the geometry. we can think it as 2D problem:

 

http://upload.wikimedia.org/wikipedia/commons/6/6f/Incircle_and_Excircles.svg

 

Suppose my sphere is the top one (with center in Ja), I need to find that Ja vector. I have the sphere (radius, direction etc..), the geometry (can be a triangle, separate lines, no problem..). I already managed the case of hitting a line, but when I change the direction across a vertex, I get incorrect result. I mean, my problem is to get the right sphere position when I have 2 lines (concave or convex).

 

Thanks,

Tim

Share this post


Link to post
Share on other sites
Advertisement

Hi,

thanks for the answer.

I know that book, it won't help that much. I need to find the closest sphere to a triangle (or convex polygon) given the direction. I can check if the circle hit the triangles but it's not moving. I just need to move the circle as close as possible to the triangle, having the imaginary moving direction for the circle.

 

Thanks,

T

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!