Visam Posted December 13, 2016 Share Posted December 13, 2016 Hi I am using BABYLON.ArcRotateCamera as a camera. For some reasons I need to set the camera mode as BABYLON.Camera.ORTHOGRAPHIC_CAMERA. I can not see zoom in/out when I am using mouse wheel. How can I fix it? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 13, 2016 Share Posted December 13, 2016 Hello There is no zoom in/out when in orthographic mode. In this case you need to play with cam.orthoLeft, orthoRight etc... Quote Link to comment Share on other sites More sharing options...
Visam Posted December 13, 2016 Author Share Posted December 13, 2016 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? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 13, 2016 Share Posted December 13, 2016 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 Quote Link to comment Share on other sites More sharing options...
Visam Posted December 13, 2016 Author Share Posted December 13, 2016 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. GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.