His game has a very nice Camera rotating mechanic where by pressing either “Q” or “E” makes the camera turn at a 90 degree angle. I have wanted to do the same using the “MouseLook” script supplied by Unity but I have no luck in doing so
I have downloaded his source code inorder to figure it out but I can’t seem to isolate the code into a script itself without errors
A coroutine is something i would do.
keep your start rotation of the Y axis and rotate it to the left \ right until it reaches the start rotation + 90.
Its not about the numbers of lines… Its about how many times those lines execute.
In your example you run forever something that should berely run. On my example you run it only when you need to. So tell me how is rotating the camera every frame on your game when youre not really changing its rotation is efficient?
Also the more code you have on the update function, the harder it gets to take care of new code