Keeping center of the screen (where the cursor is) unchanged during camera transitions

Hello,

in my setup I have 2 CinemachineFreeLook cameras. First one is for free walk mode and second is for combat walk mode, transitions use inherit position checkbox.

In the free mode, camera rotates around the player and player can walk in any direction independently of camera. The free mode camera is further away from the player and player is in the center of the screen.

In combat mode, player walks in direction of camera, camera aims on his back. Player is in the left side of the screen. This position is configured with properties screen X and screen Y of the Aim Composer.

The issue is, that when player switches between the modes, the center of the screen (where the cursor is) changes. So when cursor aims at enemy in walk mode and switches to combat mode, cursor no longer aims at the enemy, even though player did not move with his mouse.

Do you have any recomendation how to properly setup such scenario, but with steady center of the screen?

https://vimeo.com/449060519

Thank you in advance

With your current setup, there is no way for the rig to know what you are looking at, and if you move the camera off of its z-axis when transitioning, the center of screen will necessarily shift. You need a completely different setup.

CM 2.6 comes with some new components specifically designed for 3rdPerson cameras. Have a look at the AimingRig sample scene for an example of how to set it up.

The 3rdPersonWithAimingMode sample scene shows an alternative setup, based on vcams with Framing Transposer + POV.

1 Like

Thank you for your quick response and good tips! The example scenes are missing the transitions between centered and not centered cameras, so I decided to try the keeping the CinemachineFreeLook for free movement and blend it directly to cameras in the scenes.

Using the 3rdPerson camera does not solve the issue (see video below) - center of the screen is moved.

https://vimeo.com/449464924

Using the Framing Transposer + POV works! The center is kept on the same spot when aiming. I had a little problem with transition backward to POV camera (as it is in the second video), but I did some tests with disabling inherit position on CinemachineFreeLook and it helps, so I think I can tweak it.

https://vimeo.com/449468799

So I think this setup is a good start, thank you! :slight_smile:

1 Like

@trnenmic Glad you’re up and running, but I do want to comment on your attempt to use the 3rdPerson setup. I think your mistake was blending between FreeLook and 3rdPerson - FreeLook has the player as a lookAt point instead of the aim target, so it makes sense that the center of screen will shift. For better results, you should replace the FreeLook with another 3rdPerson, with different settings to mimic the placement of the FreeLook. When you do it that way, it should correctly preserve the camera aim.