Collision detection of a ball with an arc

后端 未结 3 1522
[愿得一人]
[愿得一人] 2021-01-24 20:58

I am making a simple game in which i have a ball and an arc revolving around the center. When user touches the screen the ball moves in the direction of pointer and hits the arc

3条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-24 21:38

    If it is possible for you to find the segments which make up the arc, then you could use the Intersector class to check if the circle collides with each segment. I don't know how you're making your arc so I don't know if you can get the segments or not.

提交回复
热议问题