Use CinemachinePanTilt for First Person View Camera

When using CinemachinePanTilt is there a way to transfer the rotation about the vertical axis (pan axis) to the parent game Object?
I couldn’t really find a straightforward way of doing it.

At most I have been able to get the rotation about the pan axis and change the parent gameObject’s rotation, but I wasn’t able to reset the local rotation for the Cinemachine camera.
I’m using 3.0.0-pre.3 btw.

Any help is appreciated.

Why would you like to do this? What’s the purpose of the parent object? What if the parent GameObject is not a parent, but a sibling which copies the rotation of the Cinemachine Camera?

It’s a camera that is parented to a player game object.
I want the camera to inherit all the rotation (except the tilt axis) and movement of the player object, so it can’t really be the parent transform itself.

You could do that with a Follow behaviour, this way you won’t have to undo the parent objects transformations.

Could you show me the hierarchy and the component structure, I am not quite sure I understood what you’re proposing :sweat_smile:

Could you explain the full behaviour you’d like to have?

Have you looked at the following sample scenes: ThirdPerson Shooter, Freelook? I have a feeling that you may be looking for one of the behaviours shown in these sample scenes. :wink:
You can get our sample scene from the Package Manager.

I’ll try to explain what my structure is:
8737551--1183167--upload_2023-1-18_2-33-28.png

I wanted to use the CinemachinePanTilt camera component for “CM_FP_Cam” and instead of making the camera pan around, I need to make the character pan around (i.e., rotate around the y-axis) (I need the tilt axis on the CM_FP_Cam itself), for some reason this is necessary according to my game design. (The character’s forward direction should correspond to where the character is facing).

(The camera is in First-person view, so CinemachinePanTilt provides smooth controls using exponential decay)

ThirdPerson Shooter sample shows how to do this.

If I remember correctly, this tutorial also explains it.