I’m creating the FPS game which it has full body awareness feature like Mirror’s Edge.
And like any FPS games the body is rotated according to camera look so I put my virtual camera in player gameObject.
This is my setup:
As you see there is no rotation in horizontal axis in the camera because actually it is rotated in this axis by player rotation.
But now I want to put this virtual camera out of the player gameObject and has that previous result which I just explained.
I also don’t understand your question, or what you’re trying to do.
Why do you want to unparent the vcam from the player? If you want the mouse to control player rotation, then make a script to do that. If the vcam is parented to the player, with “do nothing” in Aim and Body, it will exactly follow the player.
Because I want to transit from my third person camera to first person camera and vice versa. Also there are 2 player gameObject, one for third person and another for first person. Because of this I want to put my first person camera out of player gameObject and sync player rotation and first person camera rotation.
Also I use Rewired for input managing and player rotation depends on mouseX axis and speed parameter. I want my camera rotation speed same as player rotation speed (Typical FPS game)
Sounds like you need 2 vcams: one for FPS and one for TPS. Activate one or the other, according to the mode you’re in. Let Cinemachine do the blending for you. Keep the FPS camera inside the player GameObject.
@Gregoryl By keeping it in player GameObject how I should enable and disable player GameObject for TP and FP mode ? (For TP it is out of player GameObject)
You don’t have to disable the entire Player gameObject. Just the FPS child when you enter TPS mode.
I don’t really know how you’ve set things up, but assuming it’s like this:
Camera
brain
Player
FPS controller
vcam
TPS controller
vcam
For FPS mode disable the FPS controller component (including its vcam) and enable the TPS gameObject.
For TPS mode do the opposite.