feat: update player position

This commit is contained in:
Renge 2022-04-17 20:23:54 -04:00
parent 1a05c73f8e
commit 5520e91336

View File

@ -262,6 +262,11 @@ export default class GameLevel extends Scene {
const baseViewportSize = this.viewport.getHalfSize().scaled(2); const baseViewportSize = this.viewport.getHalfSize().scaled(2);
//check position of player //check position of player
this.playerFalloff(viewportCenter, baseViewportSize); this.playerFalloff(viewportCenter, baseViewportSize);
// Update player safe position
if (this.player.onGround) {
this.playerSpawn = this.player.position.clone();
}
//TODO - this is for testing //TODO - this is for testing
if(InputWrapper.isSpawnJustPressed()){ if(InputWrapper.isSpawnJustPressed()){