Controlling camera gimbal without localRotation

I was able to do this without using localRotation. The code is as follows. Please tell me what you think. Is this a good way of solving this or using transform.localRotation is a better practice?

It works either way with me too. In fact, I was able to use transform.parent.rotation and kept the script in the camera and move the parent. Even in this case I was able to get it to work without .localRotation. Probably better practice to put the code in the parent “player”, however and probably better practice to use .localRotation if only because it is an iron-clad way of making sure you don’t get weird rotations. This is the second course I’ve taken from these guys and I usually do it their way in the end because it makes the lectures easier to follow along later, but if you can keep in your head what you did differently from what they did as the lesson progresses, I say, go for it.

Privacy & Terms