Daria602 / SpacePatrol

A game in Unity developed for learning purposes.
0 stars 0 forks source link

Set the limits for the camera following #42

Open Daria602 opened 1 year ago

Daria602 commented 1 year ago

Think of a way to create limitations for the camera movement + LeftRightLimit tilemap movement. For now it's hardcoded in CameraFollow script, but implement it in more dynamic way.

Daria602 commented 1 year ago

Installed Cinemachine and attached CinemachineBrain to MainCamera. Created CM vcam1 that follows BetweenPlayers. Added CamBoundingBox and put it in Cinemachine Confiner 2D as Bounding Shape.