I’m currently building a FPS game with babylon.js (love the engine <3) and sometimes the player has a sniper rifle, and when they scope I would like to:
Have the UniversalCamera zoom in.
Decrease the UniversalCamera’s angularSensibility (pan around slower).
Overlay a recticle image.
Right now I know how to do 2 & 3 but not 1. I’ve looked around, searching for a way for the camera to zoom in but without luck.
I’m wondering if BJS has a function for this, or if not, is there some other way I can achive this?
If any of you guys know how I can achive this please let me know, thanks.
PS. I haven’t posted any code since I think this is a general question, let me know if you want the code though.
Hi guys. If you guys or anyone needs a non-FOV, universal-cam POSITIONAL zoom (dolly-in/out)… with working mouse-wheel… here’s my latest: https://playground.babylonjs.com/#6FHKHC#17
This event “wheel data” method CAN be used to smoothly adjust FOV too, of course.
In previous versions, line 25 used event.wheelData to get its ‘delta’. This version uses the newer event.deltaY. This new version also required a greater-than/less-than change in line 36. Party on.