Second camera view stretched on x axis

I have mi main scene witch is working fine.

The second scene has its own camera.
When i render the second scene the view is stretched on the x axis.

The second scene is only rendered correctly if i make the view port square.
I want a full screen view port without the stretching.

Any ideas on how to fix this?

Hey! do you mind reproducing the issue in the PG?

I tryed but it behaves differently and no stretching.

Going to try again.

Got it replicated in the PG.

https://playground.babylonjs.com/#W5K9TZ#1

Try this:

https://playground.babylonjs.com/#W5K9TZ#3

You must take into account the screen ratio when building your orthographic camera (or is there another way to do it?).

2 Likes

This works, thank you!