Fixing bug in convertThreeCamValuesToEngineCam (#3806)

fix: we need the up of the camera, not a hard coded up
This commit is contained in:
Kevin Nadro
2024-09-10 11:45:32 -05:00
committed by GitHub
parent dab96577a7
commit 5b2738f826

View File

@ -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),
}
}