Cinemachine Confiner Guide


Cinemachine Confiner is a component that can be added to a Cinemachine Virtual Camera in the Unity game engine. It allows you to define an area within which the camera is allowed to move, and can be used to keep the camera within the bounds of a particular area or to prevent it from moving into certain areas.

To use Cinemachine Confiner, first add it to your Cinemachine Virtual Camera by going to the Virtual Camera's Inspector window and clicking the "Add Component" button. Then, in the Confiner's Inspector window, you can specify the type of confiner you want to use. There are three options:

  1. Polygon: Allows you to define a custom shape by specifying a series of points that form the edges of the confiner.

  2. Box: Allows you to define a rectangular confiner by specifying the size of the box.

  3. Sphere: Allows you to define a spherical confiner by specifying the radius of the sphere.

Once you've chosen the type of confiner you want to use, you can adjust its parameters to define the area within which the camera is allowed to move. You can also specify whether the camera should be allowed to rotate freely or if it should be confined to a particular range of angles.