New Babylon user here, hopefully a simple question but I cannot seem to find anything describing how to set the aspect ratio of any of the perspective oriented cameras.
I’m coming from other graphics apis / math libraries and the aspect ratio is usually one of the parameters in the camera constructor or has a setter of some sort so I was curious as to what the right way to do things is in Babylon.
For example, I have a render target I’d like to render some stuff onto that is 512x512. Of course, taking the aspect ratio of the canvas won’t always work and will usually result in a squashed image.
I kind of figured out a workaround by calling
setSize on my
Engine instance, setting the size to 512x512, then back to the “normal” size, but I wasn’t sure if that was how things were generally handled.
Any help is appreciated! Thanks!