VR headset object management

This commit is contained in:
2025-06-30 23:06:22 +03:00
parent 392a94698b
commit 4ca83b7d87
11 changed files with 71 additions and 53 deletions
+2 -1
View File
@@ -20,7 +20,7 @@ class Hero{
this.actionIdle = this.mixer.clipAction( this.object.animations.find(a=>a.name=='idle') );
this.actionIdle.play();
this.activeAction = this.actionIdle;
this.pointerControls = new PointerControls(gameEngine.cameraPivot, this.model, gameEngine.renderer.domElement);
this.pointerControls = new PointerControls(gameEngine.camera, this.model, gameEngine.renderer.domElement);
gameEngine.hero = this;
// Character Collider
@@ -96,6 +96,7 @@ class Hero{
}
update(){
return;
let { inputVelocity, velocity, euler, quat, v, targetQuaternion, clock } = this;
let pc = this.pointerControls;
pc.update();