Simple camera zoom issue

Hi,

I have a script for camera zoom alone. It’s working fine, however, at the start the camera seems to be too much zoomed in. I have no idea why. Below is the project link and the script name is zoom.js.

https://playcanvas.com/editor/scene/984703

Any help is appreciated.

Hello @contractkiller,

Everything you have so far is correct, but you’re missing a small step. For this to work you need to run at least once your zoomIn method, e.g. add this after line 19 in your initialize() method

this.zoomIn(0);

and it will work just fine!

1 Like

Thank you so much Leonidas… that did the trick… :slight_smile:

1 Like