How can I get a 2D texture to rotate like a compass in XNA?

Posted by IronGiraffe on Game Development See other posts from Game Development or by IronGiraffe
Published on 2012-09-19T06:21:09Z Indexed on 2012/09/19 9:53 UTC
Read the original article Hit count: 233

Filed under:
|
|

I'm working on a small maze puzzle game and I'm trying to add a compass to make it somewhat easier for the player to find their way around the maze. The problem is: I'm using XNA's draw method to rotate the arrow and I don't really know how to get it to rotate properly. What I need it to do is point towards the exit from the player's position, but I'm not sure how I can do that.

So does anyone know how I can do this? Is there a better way to do it?

© Game Development or respective owner

Related posts about XNA

Related posts about math