I'm not a genius in geometry, I'd like to find a point in as3
with the radius
and a angle
but I don't remember the rule, I know this should be simple!
Here's an example:
alt text http://img297.imageshack.us/img297/4879/examplepr.png
Learn to love math! (Or at least understand it.) If your starting point is (0,0), and your new point is r units away at an angle of θ, you can find the coordinates of that point using the equations x = r cosθ and y = r sinθ.
as3.x = centerX + radius * cos(angle)
as3.y = centerY + radius * sin(angle)
Note that the rotation in the picture linked to is in the "negative direction". I.e, an increase of the angle, yields a counter-clockwise rotation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With