Answer the question
In order to leave comments, you need to log in
How to relink a camera to Cinemachine?
I had this camera move
if(Input.GetMouseButtonDown(0)){ CurrentPositionCamera = MainCamera.ScreenToWorldPoint(Input.mousePosition); }
if(Input.GetMouseButton(0)){
Vector3 DifferencePositionCamera = CurrentPositionCamera - MainCamera.ScreenToWorldPoint(Input.mousePosition);
if(DifferencePositionCamera != PrevPositionCamera){
MainCamera.transform.position += DifferencePositionCamera;
}
...............
Answer the question
In order to leave comments, you need to log in
Try this: Cinemachine-Create Virtual Camera. In the created object, set CinemachineConfinder to Add Extension, then create an empty object, add Polygon Collider 2D to it, then click on Edit Collider. Select the zone as you like, and attach this object in CinemachineConfinder-Bounding Shaer 2D
It may be necessary to make Polygon Collider 2D a trigger, but I'm not sure.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question