I have a program with a Ellipse2D
(which is a circle) and a Polygon
object. I have decided to use the collision detection solution at this question to handle the detection of collisions.
I want the circle object to remain on top of the polygon at all times.
I now know when the Ellipse2D
object intersects the polygon, but I would like to know WHERE they intersect. I don't currently know of any way to detect how high the circle object should move in order to remain on top of the polygon.
My intent is to move the circle upwards to always remain "on top" of the polygon when the two objects move toward each other horizontally.
Is there a tool or method out there that I am not aware of that returns a collision point or is this something I will have to develop on my own?