up tweak
This commit is contained in:
@ -262,7 +262,12 @@ export class CameraControls {
|
||||
camSettings.orientation.z,
|
||||
camSettings.orientation.w
|
||||
).invert()
|
||||
this.camera.up.copy(new Vector3(0, 1, 0).applyQuaternion(quat))
|
||||
const yo = new Vector3(0, 1, 0).applyQuaternion(quat)
|
||||
if (yo.z < 0) {
|
||||
this.camera.up.set(0, 0, -1)
|
||||
} else {
|
||||
this.camera.up.set(0, 0, 1)
|
||||
}
|
||||
if (this.camera instanceof PerspectiveCamera && camSettings.ortho) {
|
||||
this.useOrthographicCamera()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user