Fix: aspect ratio updates on camera switch
This commit is contained in:
@@ -124,7 +124,10 @@ export class CameraManager extends SceneFeature {
|
||||
state.camera.aspect = newCam.aspect;
|
||||
state.camera.near = newCam.near;
|
||||
state.camera.far = newCam.far;
|
||||
state.camera.aspect = window.innerWidth / window.innerHeight;
|
||||
state.camera.updateProjectionMatrix();
|
||||
|
||||
state.renderer.setSize(window.innerWidth, window.innerHeight);
|
||||
}
|
||||
|
||||
update(deltaTime) {
|
||||
|
||||
Reference in New Issue
Block a user