Unity 3D: how to make boundaries using cinemachine?

4.3k Views Asked by At

I am trying to achieve same camera settings as in the video I am attaching below

Video: https://drive.google.com/file/d/1jtb3D9qzOE3NYC6DuWkDCXflPWYT-nuz/view?usp=drivesdk

My project have similar concept as in the video, you go up on tapping and thus I want to achieve the same camera settings

As you can see, when I tap and cube goes up the camera starts moving only after cube have reaches a certain position, and after going up a bit the camera locks and doesn't allow to go down anymore. I want to have same as this, go up and camera moves after a certain position and after a certain distance it locks. I am using cinemachine. I am kinda new to it, so any coding help is appreciated. Please help Thanks

1

There are 1 best solutions below

2
On

You can use Cinemachine Confiner, which limits the camera movement to a given volume.

See here: https://docs.unity3d.com/Packages/[email protected]/manual/CinemachineConfiner.html

~Pino