Cinemachine Camera Implementation

The Character Controller has been ported to cinemachine for a much smoother camera view. The cinemachine aiming mechanic, 1st person and 3rd Person view has been implemented. And of course everything is still working in multiplayer!

Changes for Cinemachine

The Player Prefab (in NononCharController–>Prefabs–>Player) has been changed to use the cinemachine mechanics.

MainCamera: The main camera has attached two components. NononPlayerCameraCM for the movement with mouse like in the old script. And the Cinemachine Brain to make the cinemachine mechanics possible. In the default blend you find also the time to switch between 1st and 3rd player.

CameraAimTarget: The CameraAimTarget is updated through a script “CameraAimTargetUpdater“, which aligns the Aim Target to the Cinemachine aim target. This object is used to sync the rigging aiming with the aiming of cinemachine.

FirstPersonVCam: This is the virtual camera for the first person view. The camera switches between 1st and 3rd person with “c” or the left stick of the controller.

ThirdPersonVCam: This is the virtual camera for the 3rd person view.

FollowPlayerTarget: This object is configured in the virtual cameras as Follow target. Cinemachine is using that to adjust the camera.
This object is also rotated in the script to implement the rotate around feature

CrosshairCanvas: These are the two crosshair targets, that are displayed when the weapon is drawn and when the target is detected within range.


Leave a Reply

Avatar placeholder