So, let's say I have a circle
o
How do I make another object set it's position to the edge of the circle, relative to my mouse position?
Develop games in your browser. Powerful, performant & highly capable.
Let's call A = angle(center of the circle,mouse)
Then you have the coordonates for your object with some trigonometry.
X = cos(A)*D/2
Y = sin(A)*D/2
Where D is the diameter of the circle.
Guizmus Thank you, very helpful! Had to tweak a little but it worked like a charm <img src="smileys/smiley1.gif" border="0" align="middle" />