LocalRotation and Transform Rotate
I have no idea how to change it to localRotation
transform.Rotate(Vector3.right * Speed* Time.deltaTime);
How to convert it to work the same but in localRotation? The instruction is in the loop, I tried to do it like that:
Vector3 rotationVector = new Vector3(1, 0, 0);
transform.localRotation = Quaternion.Euler(rotationVector);
but it does not work Please help
Answer by f03n1x · Feb 15, 2019 at 01:54 PM
Looks like you are on the right track, but transform.Rotate has another override containing the option for rotating local or world axis, using Space.World or Space.Self.
I found this information on this site: https://docs.unity3d.com/ScriptReference/Transform.Rotate.html
Your answer
Follow this Question
Related Questions
What is the difference between setting transform.eulerAngles and transform.rotation? 1 Answer
Syncing character animation with game object's local transform (SOLVED!) 1 Answer
My rotation is not the same in inspector as it is in the scirpt 0 Answers
transform rotations overwriting eachother 1 Answer
3D, Rotate gun towards mouse 0 Answers