Face Mouse
flapair
Member Posts: 67
HI everyone i always made the same code to my character so they faced the mouse which is the following:
Constrain Attribute -> self.Rotation (to)-> vectorToAngle( game.Mouse.Position.X - self.Position.X , game.Mouse.Position.Y - self.Position.Y )
It always worked but this time the actor is not rotating is not doing! Does someone know why nothing is happening?
Constrain Attribute -> self.Rotation (to)-> vectorToAngle( game.Mouse.Position.X - self.Position.X , game.Mouse.Position.Y - self.Position.Y )
It always worked but this time the actor is not rotating is not doing! Does someone know why nothing is happening?
Comments
whats the issue its not rotating at all or rotating incorrectly? IF its incorectly rotating are you sure the image you have for the rotation actor is facing right, if its not rotating at all are you sure the rules are in the actor in the scene if its unlocked?
If not you need to change mouseposition to "mouse.positoin + camera.origin" for both the x and y
Hope this helps!
RThurman
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx