Actor points opposite direction after going past certain distance

TrollingtonTrollington Member Posts: 0
edited February 2012 in Working with GS (Mac)
I have an actor that 'holds' a gun that rotates to always stay pointed towards the mouse so that it shoots where ever the mouse is pointed on the screen. I have this problem where if I go past the original resolution of the scene (1280x720 is the original but I extended it to 2560x720 to make a side scroller type game) the gun actor starts to point the oposite of where the mouse is. How do I fix this problem?

To make the gun point towards the mouse I used the constrain attribute to constrain self.rotate to vectorToAngle( game.Mouse.Position.X - self.Position.X , game.Mouse.Position.Y - self.Position.Y ).

Any help is appreciated, thanks!
Sign In or Register to comment.