Hello
I have a 2D sprite image that i rotate right when moving right and left when moving left.
The problem is that when pressing right or left too much the sprite round 360 while i want to limit it to 60 angel to each side.
Code used for rotating the image:
transform.Rotate(0,0,RightLeftSensitivity*controller.moving.x*-1f);
controller.moving.x is 1 or -1 i pressing right/left and 0 if not moving
RightLeftSensitivity is speed value.
This code inside the Player.cs in the Update() function.
I am quite newb, so what ever i tried didn’t work or made strange effects on the image.