fix PointerLockControls erratic behaviour

This commit is contained in:
2025-11-30 11:44:18 +02:00
parent 07ce5bc2af
commit f7d6244fa5
3 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -87,7 +87,7 @@ class Hero{
}
lockControls(){
this.pointerControls.controls.lock();
this.pointerControls.controls.lock(true);
}
update(delta){
@@ -107,7 +107,7 @@ class Hero{
let pc = this.pointerControls;
if (pc.controls.isLocked && this.model.visible){
this.model.visible = false;
this.camera.rotation.reorder('YXZ');
this.camera.rotation.reorder('YZX');
}
if (!pc.controls.isLocked && !this.model.visible){
this.model.visible = true;