(edit:) tl;dr: I want to create a position on a circle, found a formula for it, but am not sure what the highlighted part means (below)
My enemies are supposed to circle the player (roughly) when getting within a certain distance of him.
I want to use pathfinding, so I simply want to create a position within said distance and have pf resolve movement.
Now i found this online and it looks just like what i need; but I have trouble reading one particular line.
a = (r02 - r12 + d2 ) / (2d)
h = r0 sinP0 ((or) r1 sinP1)
P2 = P0 + a ( P1 - P0 ) / d
x2 = x0 + a (x1 - x0) / d
y2 = y0 + a (y1 - y0) / d
x3 = x2 ± h ( y1 - y0 ) / d
y3 = y2 ± h ( x1 - x0 ) / d
So this translates nicely to my setup, my only trouble is that black line:
what is "r0 sinP0"?
sinus of a position vector, multiplied by the radius? is that what it's saying? how do i take sinus of a vector?