Fixing bug in convertThreeCamValuesToEngineCam (#3806)
fix: we need the up of the camera, not a hard coded up
This commit is contained in:
@ -550,7 +550,7 @@ export class CameraControls {
|
||||
const oldFov = this.camera.fov
|
||||
|
||||
const viewHeightFactor = (fov: number) => {
|
||||
/* *
|
||||
/* *
|
||||
/|
|
||||
/ |
|
||||
/ |
|
||||
@ -1189,7 +1189,7 @@ function convertThreeCamValuesToEngineCam({
|
||||
const lookAt = buildLookAt(64 / zoom, target, position)
|
||||
return {
|
||||
center: new Vector3(lookAt.center.x, lookAt.center.y, lookAt.center.z),
|
||||
up: new Vector3(0, 0, 1),
|
||||
up: new Vector3(upVector.x, upVector.y, upVector.z),
|
||||
vantage: new Vector3(lookAt.eye.x, lookAt.eye.y, lookAt.eye.z),
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user