There is a sprite moving on mouse click.
Is there any way to find the angle between two coordinates (vector) of the sprite and the mouse click coordinates?
Develop games in your browser. Powerful, performant & highly capable.
You could use the angle() expression on both vectors to get their angles, then use the anglediff() expression to find the angle between them. Another way would be to utilize a vector dot product to find the angle.
Anglediff(angle(touch.x,touch.y,sprite.x,sprite.y),sprite.angle)
maybe?
Or would it be sprite.angle-180 to get the vector coming from the third point?