From 63bb9c3d791ab8201fa622bf308a3d5ea2f18f95 Mon Sep 17 00:00:00 2001 From: Renge Date: Fri, 8 Apr 2022 20:16:20 -0400 Subject: [PATCH] fix: view port should track player --- src/shattered_sword/Scenes/Tutorial.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/shattered_sword/Scenes/Tutorial.ts b/src/shattered_sword/Scenes/Tutorial.ts index 13dfccf..9afe627 100644 --- a/src/shattered_sword/Scenes/Tutorial.ts +++ b/src/shattered_sword/Scenes/Tutorial.ts @@ -26,6 +26,7 @@ export default class Tutorial extends GameLevel{ // Add the level 1 tilemap this.add.tilemap("forest1", new Vec2(2, 2)); this.viewport.setBounds(0, 0, this.map.width*32, this.map.height*32); + this.viewport.follow(this.player); this.playerSpawn = new Vec2(5*32, 9*32);