Hey I’m new to Unity Scripting and made this code based on a tutorial for 2d platforming to turn my character.
I want it only to do a quarter rotation Like this.
But I can’t use + or - or / or * in the code with out getting an error.
Help would be nice.
(Please Excuse the awful Bird’s eye view drawing)
// Set rotation to the move direction
if (movement.direction.sqrMagnitude > 0.01)
transform.rotation = Quaternion.Slerp (transform.rotation, Quaternion.LookRotation (-movement.direction), Time.deltaTime * movement.rotationSmoothing);
Thank You,
-Dragonos-