[Unity-Cinemachine Camera] The essence and basic properties of Virtual Camera

 We can modify individual properties as the game progresses, but conceptually it's better to think of the Virtual Camera as a "profile" of camera behavior rather than a component.

Our camera has several behaviors, so we prepare several virtual cameras for it. For example, when the character moves, we prepare a third-person camera, for aiming, we prepare a first-person camera, and for process animation, we prepare a fixed camera or a slide camera.

        Once the properties in the virtual camera have been set, you should avoid modifying them in the game. If you need to modify multiple attributes of a virtual camera in the game, please consider making another virtual camera, which will not consume much system resources, making it easier to manage your own camera behavior.

Status: There are three statuses:

  • The active state Live indicates that Cinemachine is using the properties of this virtual camera to control the camera;
  • Standby state means that the virtual camera is not used by the cinemachine brain, but the virtual camera itself is still running. The following calculations such as following and aiming may not stop. Its calculation frequency or refresh frequency is determined by StandBy Update.

  • Disabled state

The solo behind the camera can activate the current camera immediately, allowing us to observe the working status of the virtual camera at any time during development.

Game Window Guides: Game window guides. After opening, some prompt information of the virtual camera will be displayed on the game interface.

Save During Play: If you activate it, the modifications to the virtual camera during play will be saved.

Priority: cinemachine Brain will use the virtual camera with higher priority. You can switch the virtual camera by modifying the priority, but using it in Timeline has no effect.

Follow: The virtual camera will follow the movement of the game object here. The specific following movement behavior is set in the body below.

Look At: The virtual camera will look at this game object. The specific behavior of Look At is set in aim.

Standby Update: refers to how often calculations such as follow and look at should be refreshed when the camera is in standby state, that is, Standby state. Never means never to execute or refresh; always means the frequency of execution and refresh. It is the same as the activated camera; round robin is a rotating update strategy, which can be roughly understood as selecting a standby camera for update in each frame.

Lens: lens settings

  • Vertical FOV: angle of view

  • near Clip Plane: Near clipping plane, game objects closer to the camera than this value will not be rendered.

  • far clip plane: far clipping plane, game objects whose distance from the camera is greater than this value will not be rendered.

  • Dutch: dutch angle, which is the angle of the oblique lens

Use with the following camera types

Advanced: The camera can be modified as an orthographic camera, perspective camera, or physical camera

Transitions: There are some property settings when switching virtual cameras

  • Blend Hint: refers to the physical characteristics of the camera switching behavior

    • none: It is the difference between the angle and the position, which is a linear switch.

    • Spherical Position: Spherical switching. If there is an object in Look At, use it as the center of the sphere to make a spherical switching. The path drawn by the camera is roughly on a spherical surface.

    • Cylindrical Position: Cylindrical switching. If there is an object in Look At, then take it as the center, perform circular switching on the horizontal plane, and perform linear switching on the vertical direction. The path crossed by the camera is roughly on the surface of a cylinder. superior

    • Screen Space Aim When Targets Differ: But when the target of Look At is different, switch between screen spaces. This switching uses the world coordinate system in the position, showing an ordinary linear switching, and in the angle, it will be based on Switch between the angles of the screen space formed by the two cameras

  • Inherit Position means that when the virtual camera is activated, instead of moving the camera to the position of the virtual camera, the virtual camera moves to the position of the camera.

Body is related to Follow, aim is related to look at, and noise can add a shaking effect to the camera.

Extensions: You can add some additional functions, such as camera collision detection and other functions

Guess you like

Origin blog.csdn.net/weixin_60154963/article/details/132610892