Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get collision detection of circle and triangle

I have one triangle ad one circle moving objects on plane.How will i know both of them are collide to each other. ?

like image 277
Ajay_Kumar Avatar asked Apr 01 '11 21:04

Ajay_Kumar


People also ask

How do you find the collision between a circle and a rectangle?

Case 1: The side of the rectangle touches or intersects the circle. In order to check whether the shapes intersect, we need to find a point on or inside the rectangle that is closest to the center of the circle. If this point lies on or inside the circle, it is guaranteed that both the shapes intersect.

How do you do collision detection?

If both the horizontal and vertical edges overlap we have a collision. We check if the right side of the first object is greater than the left side of the second object and if the second object's right side is greater than the first object's left side; similarly for the vertical axis.

How does collision work in games?

Collision Physics in Video Games In the context of rigid body simulations, a collision happens when the shapes of two rigid bodies are intersecting, or when the distance between these shapes falls below a small tolerance.


1 Answers

Circle - triangle interesction test is what you want
http://www.phatcode.net/articles.php?id=459

like image 164
unexpectedvalue Avatar answered Nov 02 '22 04:11

unexpectedvalue