Help with orthographic projection

Hi,

I have used a orthogrpahic projection of ArcRotateCamera.
When I rendered a sphere it looks elongated. (similar to ellipsis in 3D).

public setOrthographicParams(left: number, top: number, right: number, bottom : number): void{
 this.camera.orthoLeft = left;
 this.camera.orthoRight = right;
 this.camera.orthoTop = top;
 this.camera.orthoBottom = bottom;     
}

this.camera.mode = BABYLON.Camera.ORTHOGRAPHIC_CAMERA;

Do I miss aspect ratio or some settings in orthographic projection, while defining ArcRotateCamera?

Multiply orthoLeft and orthoRight by scene.getEngine().getAspectRatio(camera) and that should do it.

3 Likes

@Evgeni_Popov
It works fine now.
Thanks a lot.