I’m trying to create an inventory system in which the player takes off their backpack and looks into it. I have the basic animation set up, but I am having trouble smoothly transitioning from the player being able to look around freely to the camera being forced to look into the backpack. When I update the camera’s rotation in the Update function, even when the animation is not playing, the camera is clamped in the starting rotation for the animation and the player cannot look around. If I change it so that the camera updates in the LateUpdate function, then I can rotate the camera but when I start playing the animation, the camera instantly snaps to the starting position. I would like to achieve an effect where the player would be able to look around but as soon as they press the inventory button, the camera cross-fades from its current rotation into the animation. Sorry if what I am saying isn’t clear and thanks for any help.
P.S.
I know how I could do this through scripting by just rotating the camera to the starting position and then playing the animation, but I want to achieve a more fluid and dynamic effect and not increase the total time it takes to access the backpack.
P.S.S.
I already have code in place that stops the player from walking and looking around when they press the inventory button.