Why won't the camera zoom in and out with this blueprint?




So I’ve been following a tutorial to allow me to move the camera independently from a top down character and began with a simple zoom in/zoom out with the scroll wheel, but so far, scrolling up and down isn’t doing anything.

  • I checked that the blueprint is correct
  • I tried removing some redundant variable calls
  • I tried debigging it live, but I couldn’t tell where the issue lies
  • Retried creating the blueprint on a new project (incase I messed up smth in the settings)

But so far no dice. I’m genuinley new to UE and game dev in general (started a few days ago) so I’m not sure if there is smth obvious staring me in the face. Any help would be appreciated. Thanks in advance.

The best way to fix problems like this is to follow the code start to finish with print strings. Put a print string after one of the branches in the MouseWheelAxis event and see if it fires as expected. Add a .2 second delay and a print string to the end of the event tick to print the CameraPosition variable and see if that is changing properly. There doesn’t seem to be any obvious problem, my best guess is you forgot to set the default value of the CamZoomDelta or Maxcampos variable.

1 Like

Issue Solution: Turns out the delta seconds I used from the tick rate was way too low for the interpolation. I just used a constant instead.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.