Fix perspective camera toggle in debug pane to update immediately (#2969)
This commit is contained in:
@ -518,9 +518,9 @@ export class CameraControls {
|
|||||||
direction.normalize()
|
direction.normalize()
|
||||||
this.camera.position.copy(this.target).addScaledVector(direction, distance)
|
this.camera.position.copy(this.target).addScaledVector(direction, distance)
|
||||||
}
|
}
|
||||||
usePerspectiveCamera = async () => {
|
usePerspectiveCamera = async (forceSend = false) => {
|
||||||
this._usePerspectiveCamera()
|
this._usePerspectiveCamera()
|
||||||
if (this.syncDirection === 'clientToEngine') {
|
if (forceSend || this.syncDirection === 'clientToEngine') {
|
||||||
await this.engineCommandManager.sendSceneCommand({
|
await this.engineCommandManager.sendSceneCommand({
|
||||||
type: 'modeling_cmd_req',
|
type: 'modeling_cmd_req',
|
||||||
cmd_id: uuidv4(),
|
cmd_id: uuidv4(),
|
||||||
|
@ -717,7 +717,7 @@ export const CamDebugSettings = () => {
|
|||||||
if (camSettings.type === 'perspective') {
|
if (camSettings.type === 'perspective') {
|
||||||
sceneInfra.camControls.useOrthographicCamera()
|
sceneInfra.camControls.useOrthographicCamera()
|
||||||
} else {
|
} else {
|
||||||
sceneInfra.camControls.usePerspectiveCamera()
|
sceneInfra.camControls.usePerspectiveCamera(true)
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
Reference in New Issue
Block a user