CinemachineComposer Class

Cinemachine

CinemachineComposer Class

This is a CinemachineComponent in the Aim section of the component pipeline. Its job is to aim the camera at the vcam's LookAt target object, with configurable offsets, damping, and composition rules. The composer does not change the camera's position. It will only pan and tilt the camera where it is, in order to get the desired framing. To move the camera, you have to use the virtual camera's Body section.
Inheritance Hierarchy
SystemObject  Object
    Component
      Behaviour
        MonoBehaviour
          CinemachineCinemachineComponentBase
            CinemachineCinemachineComposer
              CinemachineCinemachineGroupComposer

Namespace:  Cinemachine
Assembly:  Cinemachine (in Cinemachine.dll) Version: 2.0.0.0 (2.0.0.0)
Syntax
[DocumentationSortingAttribute(3f, DocumentationSortingAttributeLevel.UserRef)]
[ExecuteInEditMode]
[AddComponentMenu("")]
[RequireComponent(typeof(CinemachinePipeline))]
[SaveDuringPlayAttribute]
public class CinemachineComposer : CinemachineComponentBase
Cinemachine.CinemachineComposer = function();

Type.createClass(
	'Cinemachine.CinemachineComposer',
	Cinemachine.CinemachineComponentBase);

The CinemachineComposer type exposes the following members.

Properties
  NameDescription
Public propertyFollowTarget
Returns the owner vcam's Follow target.
(Inherited from CinemachineComponentBase.)
Public propertyHardGuideRect
Internal API for the inspector editor
Public propertyIsValid
True if component is enabled and has a LookAt defined
(Overrides CinemachineComponentBaseIsValid.)
Public propertyLookAtTarget
Returns the owner vcam's LookAt target.
(Inherited from CinemachineComponentBase.)
Public propertySoftGuideRect
Internal API for the inspector editor
Public propertyStage
Get the Cinemachine Pipeline stage that this component implements. Always returns the Aim stage
(Overrides CinemachineComponentBaseStage.)
Public propertyVcamState
Returns the owner vcam's CameraState.
(Inherited from CinemachineComponentBase.)
Public propertyVirtualCamera
Get the associated CinemachineVirtualCameraBase
(Inherited from CinemachineComponentBase.)
Top
Methods
  NameDescription
Protected methodGetTrackedPoint
Apply the target offsets to the target location.
Public methodMutateCameraState
Applies the composer rules and orients the camera accordingly
(Overrides CinemachineComponentBaseMutateCameraState(CameraState, Single).)
Public methodOnPositionDragged
API for the editor, to process a position drag from the user. Base class implementation does nothing.
(Inherited from CinemachineComponentBase.)
Top
Fields
  NameDescription
Public fieldm_BiasX
A non-zero bias will move the targt position away from the center of the soft zone
Public fieldm_BiasY
A non-zero bias will move the targt position away from the center of the soft zone
Public fieldm_DeadZoneHeight
Camera will not rotate vertically if the target is within this range of the position
Public fieldm_DeadZoneWidth
Camera will not rotate horizontally if the target is within this range of the position
Public fieldm_HorizontalDamping
How aggressively the camera tries to follow the target in the screen-horizontal direction. Small numbers are more responsive, rapidly orienting the camera to keep the target in the dead zone. Larger numbers give a more heavy slowly responding camera. Using different vertical and horizontal settings can yield a wide range of camera behaviors.
Public fieldm_LookaheadSmoothing
Controls the smoothness of the lookahead algorithm. Larger values smooth out jittery predictions and also increase prediction lag
Public fieldm_LookaheadTime
This setting will instruct the composer to adjust its target offset based on the motion of the target. The composer will look at a point where it estimates the target will be this many seconds into the future. Note that this setting is sensitive to noisy animation, and can amplify the noise, resulting in undesirable camera jitter. If the camera jitters unacceptably when the target is in motion, turn down this setting, or animate the target more smoothly.
Public fieldm_ScreenX
Horizontal screen position for target. The camera will rotate to the position the tracked object here
Public fieldm_ScreenY
Vertical screen position for target, The camera will rotate to to position the tracked object here
Public fieldm_SoftZoneHeight
When target is within this region, camera will gradually move to re-align towards the desired position, depending onm the damping speed
Public fieldm_SoftZoneWidth
When target is within this region, camera will gradually move to re-align towards the desired position, depending onm the damping speed
Public fieldm_TrackedObjectOffset
Target offset from the object's center in LOCAL space which the Composer tracks. Use this to fine-tune the tracking target position when the desired area is not in the tracked object's center
Public fieldm_VerticalDamping
How aggressively the camera tries to follow the target in the screen-vertical direction. Small numbers are more responsive, rapidly orienting the camera to keep the target in the dead zone. Larger numbers give a more heavy slowly responding camera. Using different vertical and horizontal settings can yield a wide range of camera behaviors.
Public fieldOnGUICallback
Used by the Inspector Editor to display on-screen guides.
Top
See Also