Skip to content

Commit

Permalink
Follow Cam
Browse files Browse the repository at this point in the history
  • Loading branch information
LarsZauberer committed Feb 10, 2021
1 parent 60bf259 commit 4a95f43
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Assets/Scripts/Player/Player.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,9 @@ void camFollow() {
if (camStartPos.x < transform.position.x) {
camObj.transform.position = new Vector3(transform.position.x, camObj.transform.position.y, -10);
}

if (camStartPos.y < transform.position.y) {
camObj.transform.position = new Vector3(camObj.transform.position.x, transform.position.y, -10);
}
}
}

0 comments on commit 4a95f43

Please sign in to comment.