Rotating player/weapons sprite's direction with mouse



  • Hi,
    I've recently decided to transition from Love2D to Haxeflixel. I'm still an absolute beginner when it comes to programming so bear with me please. With the move to HaxeFlixel, I want to port over my little work in progress game that I was working on in Love2D where the the weapon (drawn separetly) aim is controlled with mouse courser position. If player moves their mouse over to the left side, the the player's sprite flips over to look at the mouse and vice versa, here's a little example:

    alt text

    How could I implement this using flixel? I'm aware that flixel has a lot of functions built in to do this, rather than doing all the maths myself.


Log in to reply
 

Looks like your connection to HaxeFlixel was lost, please wait while we try to reconnect.