Closed PeterZhizhin closed 3 months ago
This piece of code uses uninitialized variable:
setDirection( dir ) { if (dir.y > 0.99999) { this.quaternion.set(0, 0, 0, 1); } else if (dir.y < - 0.99999) { this.quaternion.set(1, 0, 0, 0); } else { _axis.set(dir.z, 0, -dir.x).normalize(); const radians = Math.acos(dir.y); this.quaternion.setFromAxisAngle(_axis, radians); } }
I add a global constant to fix this, similar to this threejs example file: https://github.com/mrdoob/three.js/blob/dev/examples/jsm/utils/CameraUtils.js
I included this fix with this PR that's going into dev soon and should be released this week.
dev
This piece of code uses uninitialized variable:
I add a global constant to fix this, similar to this threejs example file: https://github.com/mrdoob/three.js/blob/dev/examples/jsm/utils/CameraUtils.js