Horizontal window resizing

engine.resize works vertically but not horizontally. Could someone please show me how to make it work in both veretical and horizontal or if only one direction is possible then how to make it work horizontally. My babylon model is to be used on a webpage and should be viewed on any sized screen.

Richard C

Hi RichardC,

I’m not 100% sure what you mean by “works vertically but not horizontally.” If you’d like it to recalculate the camera’s parameters to preserve horizontal FOV instead of vertical, perhaps you’re looking for Camera.fovMode? Here’s a Playground that shows this behavior (line 30).

1 Like

Thanks. That did the trick