CinemachineConfiner Class

Cinemachine

CinemachineConfiner Class

An add-on module for Cinemachine Virtual Camera that post-processes the final position of the virtual camera. It will confine the virtual camera's position to the volume specified in the Bounding Volume field.
Inheritance Hierarchy
SystemObject  Object
    Component
      Behaviour
        MonoBehaviour
          CinemachineCinemachineExtension
            CinemachineCinemachineConfiner

Namespace:  Cinemachine
Assembly:  Cinemachine (in Cinemachine.dll) Version: 2.0.0.0 (2.0.0.0)
Syntax
[DocumentationSortingAttribute(22f, DocumentationSortingAttributeLevel.UserRef)]
[ExecuteInEditMode]
[AddComponentMenu("")]
[SaveDuringPlayAttribute]
public class CinemachineConfiner : CinemachineExtension
Cinemachine.CinemachineConfiner = function();

Type.createClass(
	'Cinemachine.CinemachineConfiner',
	Cinemachine.CinemachineExtension);

The CinemachineConfiner type exposes the following members.

Constructors
  NameDescription
Public methodCinemachineConfiner
Top
Properties
  NameDescription
Public propertyIsValid
Check if the bounding volume is defined
Public propertyVirtualCamera
Get the associated CinemachineVirtualCameraBase
(Inherited from CinemachineExtension.)
Top
Methods
  NameDescription
Protected methodAwake
Connect to virtual camera pipeline. Override implementations must call this base implementation
(Inherited from CinemachineExtension.)
Public methodCameraWasDisplaced
See whether the virtual camera has been moved by the confiner
Protected methodGetAllExtraStatesT
Ineffeicient method to get all extra state infor for all vcams. Intended for Editor use only, not runtime!
(Inherited from CinemachineExtension.)
Protected methodGetExtraStateT
Because extensions can be placed on manager cams and will in that case be called for all the vcam children, vcam-specific state information should be stored here. Just define a class to hold your state info and use it exclusively when calling this.
(Inherited from CinemachineExtension.)
Public methodInvalidatePathCache
Call this if the bounding shape's points change at runtime
Protected methodOnDestroy
Disconnect from virtual camera pipeline. Override implementations must call this base implementation
(Inherited from CinemachineExtension.)
Protected methodPostPipelineStageCallback
Callback to to the camera confining
(Overrides CinemachineExtensionPostPipelineStageCallback(CinemachineVirtualCameraBase, CinemachineCoreStage, CameraState, Single).)
Top
Fields
  NameDescription
Public fieldm_BoundingShape2D
The 2D shape within which the camera is to be contained.
Public fieldm_BoundingVolume
The volume within which the camera is to be contained.
Public fieldm_ConfineMode
The confiner can operate using a 2D bounding shape or a 3D bounding volume
Public fieldm_ConfineScreenEdges
If camera is orthographic, screen edges will be confined to the volume.
Public fieldm_Damping
How gradually to return the camera to the bounding volume if it goes beyond the borders
Top
See Also