move the position.x to the cube
This commit is contained in:
parent
9b980000dd
commit
d82d65677b
2 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
Reference in a new issue