I've been looking for a whole day looking at how to detect the collisions between a circle and a rectangle, please if you have any solution apply it to the following code
Whether the distance between two center points is shorter than sum of each center-edge length at that direction.
Edge Tracking, by Morpheus
I think your circle and rectangle are designed in this way:
If this is correct then here is a thought.
The equation of a circle is:
Now try to find any point in the rectangle that will satisfy the equation.
If your circle and rectangle behave in a fixed way I could simplify this.