diff --git a/src/lib/Hero.js b/src/lib/Hero.js index 7502a09..b2912cb 100644 --- a/src/lib/Hero.js +++ b/src/lib/Hero.js @@ -228,7 +228,7 @@ class Hero{ let cameraPosition = new Vector3().copy(this.camera.position) let cameraDesiredPosition = new Vector3( this.model.position.x + this.#cameraZ* Math.sin(this.model.rotation.y + Math.PI + this.cameraDelta + this.cameraIdleDelta), - pc.controls.isLocked? this.size.y*0.9 : (this.cameraY + this.model.position.y), + this.model.position.y + (pc.controls.isLocked? this.size.y*0.9 : this.cameraY), this.model.position.z + this.#cameraZ* Math.cos(this.model.rotation.y + Math.PI + this.cameraDelta + this.cameraIdleDelta) )