Jump to content
  • Advertisement
Sign in to follow this  
urisoft

colosion between line and an arc. is there a formula?

This topic is 4829 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 want to see whether a line (represented by 2 points) and an arc (represented by center point radius and angles) colide with eachother. is there a formula or an algorythem to check it? i tried to make it myself... but it's hard. any one can help?

Share this post


Link to post
Share on other sites
Advertisement
Quote:
is there a formula or an algorythem to check it?
Yes. Start by finding the intersection point, if any, between the line and a circle that has the same center and radius as the arc. Also, find the two endpoints of the arc. If the intersection point is on the arc, it will be on one side of the line passing through the arc endpoints. If it is on the other side, the line does not intersect the arc.

For more info, see here.

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!