Camera zooming in and out problem

Hi all
Some time ago I started making Projectile motion “game” for physics project. I imagined it something like this or like this. I got almost everything right, all calculations are working properly, but I can not find a way to solve this camera zooming in and out. This is maybe most important thing because if initial speed is a little bigger my projectile goes out of camera viewport.

First I tried making buttons like in second game. I tried by changing camera field of view and changing distance from camera to cannon but in both cases after zooming my cannon was not at the same position on the ground.
Then I tried making this “zooming” like in first game but couldn’t find a way to make a camera zoom out so whole trajectory can be seen after shot landed.

I made an image to be a background of canvas, so is this the reason why I can not get this right and do I have to solve this background another way?

Thanks in advance :slight_smile:

Privacy & Terms