fix PointerLockControls erratic behaviour
This commit is contained in:
+2
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user