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.

SystemObject Object
Component
Behaviour
MonoBehaviour
CinemachineCinemachineExtension
CinemachineCinemachineConfiner
Component
Behaviour
MonoBehaviour
CinemachineCinemachineExtension
CinemachineCinemachineConfiner
Namespace: Cinemachine
Assembly: Cinemachine (in Cinemachine.dll) Version: 2.0.0.0 (2.0.0.0)

[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.

Name | Description | |
---|---|---|
![]() | CinemachineConfiner |

Name | Description | |
---|---|---|
![]() | IsValid | Check if the bounding volume is defined |
![]() | VirtualCamera | Get the associated CinemachineVirtualCameraBase (Inherited from CinemachineExtension.) |

Name | Description | |
---|---|---|
![]() | Awake | Connect to virtual camera pipeline.
Override implementations must call this base implementation (Inherited from CinemachineExtension.) |
![]() | CameraWasDisplaced | See whether the virtual camera has been moved by the confiner |
![]() | GetAllExtraStatesT | Ineffeicient method to get all extra state infor for all vcams.
Intended for Editor use only, not runtime!
(Inherited from CinemachineExtension.) |
![]() | GetExtraStateT | 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.) |
![]() | InvalidatePathCache | Call this if the bounding shape's points change at runtime |
![]() | OnDestroy | Disconnect from virtual camera pipeline.
Override implementations must call this base implementation (Inherited from CinemachineExtension.) |
![]() | PostPipelineStageCallback | Callback to to the camera confining (Overrides CinemachineExtensionPostPipelineStageCallback(CinemachineVirtualCameraBase, CinemachineCoreStage, CameraState, Single).) |

Name | Description | |
---|---|---|
![]() | m_BoundingShape2D | The 2D shape within which the camera is to be contained. |
![]() | m_BoundingVolume | The volume within which the camera is to be contained. |
![]() | m_ConfineMode | The confiner can operate using a 2D bounding shape or a 3D bounding volume |
![]() | m_ConfineScreenEdges | If camera is orthographic, screen edges will be confined to the volume. |
![]() | m_Damping | How gradually to return the camera to the bounding volume if it goes beyond the borders |
