How to use orthographic view in

I am trying to render the plane in an orthographic view but it’s not rendering properly how do I set the camera position to show an object in a proper position

Is this correct application of orthographic camera view:

Could you share a repro of your issue in your playground ?

Hi, Sure,
Playground link: https://playground.babylonjs.com/#JJG6CM#1
If a ground size is large or small this should look perfectly fitted to the screen or fitted to
rendering window using an orthographic camera

You need to set the mode of your camera to orthographic in your playground: Babylon.js Playground

camera.mode = BABYLON.Camera.ORTHOGRAPHIC_CAMERA

Does that fix it for you?

1 Like

I have tried with the ORTHOGRAPHIC_CAMERA in code but the object is not fitted to the screen can check the below link for more clarification:

what would be my camera position to set the object/plane fitted to the screen/rendering window

In this mode you manually need to adapt camera. orthoBottom, left, right and top to fit your scene.

You might find something useful in this code I use for my project to fit the camera to bounding box of an object: Fit camera to boundingbox - #4 by ajp specifically the retarget_and_move_camera_to_include_mesh function at the bottom.

1 Like

Hi, Can you please add an orthographic view for the below example it might be more clear to me how to use it
https://playground.babylonjs.com/#JJG6CM#1

1 Like