feat: update player position
This commit is contained in:
parent
1a05c73f8e
commit
5520e91336
|
@ -262,6 +262,11 @@ export default class GameLevel extends Scene {
|
|||
const baseViewportSize = this.viewport.getHalfSize().scaled(2);
|
||||
//check position of player
|
||||
this.playerFalloff(viewportCenter, baseViewportSize);
|
||||
|
||||
// Update player safe position
|
||||
if (this.player.onGround) {
|
||||
this.playerSpawn = this.player.position.clone();
|
||||
}
|
||||
|
||||
//TODO - this is for testing
|
||||
if(InputWrapper.isSpawnJustPressed()){
|
||||
|
|
Loading…
Reference in New Issue
Block a user