I'm currently trying to figure this out in AppGameKit, with no avail. But as a simple example, let's say I have an arrow placed in the middle of the screen. It's location is fixed towards the middle, but I want it to rotate towards and point at the current cursor position.
How can I go about doing this? I figured I could try it via cos/sin (make three points from the info and form a triangle), but it isn't working the way I planned. Any suggestions?
EDIT: Found a post on MSDN and found a solution that applied to AGK:
spriteAng = atanfull(spriteX - mouseX, spriteY - mouseY)
spriteAng = spriteAng + 180
setSpriteAngle(spriteID,spriteAng)
Hi there. My name is Dug. I have just met you, and I love you.