Welcome on MasterOf13FPS! MasterOf13FPS

Register today or sign up if you are already a member and never miss any cool content again :)

smooth zoom

Joined
Jan 1, 2023
Messages
7
Reaction score
0
Points
1
Hi, im starting doing a mc 1.8.9 base and I want to add a smooth zoom like lunar zoom, could someone tell me how do it? thanks
 
Java:
  if (newFov != fov) {   

            if (newFov >= mc.gameSettings.fovSetting) {

                resetOpt();

            } else {

                inZoom = true;

                this.fov = newFov;

                if (stab) {

                    float newSens = origSens * (newFov / mc.gameSettings.fovSetting);

                    mc.gameSettings.mouseSensitivity = newSens;

                    sens = newSens;

                }

            }
this should be the most important part for you, so you get an idea of how it works.
in this case the fov will be adjusted and a zoom effect is created.
making this smooth requires step wise increase of the zoom effect (for example each tick).
 
shape1
shape2
shape3
shape4
shape5
shape6
Back
Top