change player pivot to its center
This commit is contained in:
parent
9b0bdc46eb
commit
4c066091b0
|
@ -345,10 +345,12 @@ export class PlayerObject extends Group {
|
|||
|
||||
this.skin = new SkinObject(skinTexture);
|
||||
this.skin.name = "skin";
|
||||
this.skin.position.y = 8;
|
||||
this.add(this.skin);
|
||||
|
||||
this.cape = new CapeObject(capeTexture);
|
||||
this.cape.name = "cape";
|
||||
this.cape.position.y = 8;
|
||||
this.cape.position.z = -2;
|
||||
this.cape.rotation.x = 10.8 * Math.PI / 180;
|
||||
this.cape.rotation.y = Math.PI;
|
||||
|
@ -356,6 +358,7 @@ export class PlayerObject extends Group {
|
|||
|
||||
this.elytra = new ElytraObject(capeTexture);
|
||||
this.elytra.name = "elytra";
|
||||
this.elytra.position.y = 8;
|
||||
this.elytra.position.z = -2;
|
||||
this.elytra.visible = false;
|
||||
this.add(this.elytra);
|
||||
|
|
|
@ -120,7 +120,6 @@ export class SkinViewer {
|
|||
this.playerObject.cape.visible = false;
|
||||
this.playerWrapper = new Group();
|
||||
this.playerWrapper.add(this.playerObject);
|
||||
this.playerWrapper.position.y = 8;
|
||||
this.scene.add(this.playerWrapper);
|
||||
|
||||
if (options.skin !== undefined) {
|
||||
|
|
Loading…
Reference in New Issue