Jump to content

BABYLON.Camera.ORTHOGRAPHIC_CAMERA and zoom in/out


Visam
 Share

Recommended Posts

1 hour ago, Deltakosh said:

Hello

There is no zoom in/out when in orthographic mode. In this case you need to play with cam.orthoLeft, orthoRight etc...

I have already started to play with cam.orthoLeft, orthoRight etc... :-)

What is the reason to avoid adding zoom in/out when in orthographic mode?

Link to comment
Share on other sites

2 minutes ago, Deltakosh said:

because when you compute an orthographic camera there is no perspective so no fov to use for zooming:

https://github.com/BabylonJS/Babylon.js/blob/master/src/Cameras/babylon.camera.ts#L475

 

Do you mind sharing a small repro in the PG? I'll help you

Thank you for the help proposal :-)

I think I fixed the problem. Just recalculating orthoBottom, orthoTop, orthoLeft, orthoRight, minZ and maxZ.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...