Legend of Zelda OoT Camera

After a bit of experimentation, I think I’m going to have to mix functionality of the Multipurpose camera and the FreeLook Camera. I want the camera to follow the player like the Multipurpose one does, but I’d like to be able to reset the camera to facing forward with a button press, as well as allow for free-looking when desired. Additionally, if I can get to it, I’d like to make it so that any terrain objects that manage to get between the player and the camera will be made invisible.
We’ll see how it goes…

I managed to get something to work by creating a separate script that toggles the Auto Cam and the Free Look Cam off and on depending on whether you have a button pressed. So, there are two separate camera control scripts, and one that toggles between them. It’s working though!

I am interested to see how this camera currently works. Any short demo by any chance?

Here’s a short clip of the camera in action. You can see the scripts enabling/disabling on the right.
The main issue at the moment is that when the Free Look Cam enables it instantly jumps back to the same view as it was last time it was used. (See second video) Still not sure why…


1 Like

that looks great…
just noticing a very slight tilt (with the player) when player is moving and you turn them. Does the Zelda game function that way? (I will have to check some gameplay when I am free)

I’m pretty sure that’s just how the animations are done for that standard character. He has separate animations for when he’s turning that have him leaning a bit.

Fixed the issue with the FreeLookCam resetting it’s transform. After hours of debugging, I finally got it working by simply adding this to the code:

        private void OnEnable()
        {
            m_LookAngle = transform.eulerAngles.y; // reset the look angle to be directly behind the player.
        }

which makes sure that when the script is re-enabled, it will start rotating from where it IS, not where it was when it was disabled.

Privacy & Terms