move the position.x to the cube

This commit is contained in:
Mylloon 2022-11-24 21:01:14 +01:00
parent 9b980000dd
commit d82d65677b
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
2 changed files with 3 additions and 1 deletions

View file

@ -17,5 +17,8 @@ export class Cube extends Element {
// Create shadows // Create shadows
this.data.castShadow = true; this.data.castShadow = true;
// Move up
this.data.position.y = 0.5;
} }
} }

View file

@ -5,7 +5,6 @@ export class Player extends Cube {
constructor(color) { constructor(color) {
super(color, "assets/images/player.png"); super(color, "assets/images/player.png");
this.data.position.y = 0.5;
this.data.position.x = -2; this.data.position.x = -2;
this.data.rotation.x = this.gameRotation; this.data.rotation.x = this.gameRotation;