How to: Simple Camera Zoom w/ Mouse Wheel


Hey tahmidk15. I’m sure you already figured it out, but this’ll definitely work work ortho.

Instead of setting the length of the “Spring Arm” the camera is attached to, you set the “Ortho Width” property of the “camera” directly.

Yeah i figured that out with raytrace and delta location of mouse/touch on the surface, FYI your method didn’t worked orthographic camera. Changing arm length with orthographic camera doesn’t change anything.

I had been following this post in order to make my first blue print, Its the same camera that CaptanMigraine did, I also added a lock to the angle of the camera, and tried to add the camera arm socket offset (Z) capable to be increased and decreased when you hold the right and left bttons of the mouse It seems to work but it has a bug when you click the mouse to fast, since im new in BluePrints I have no idea of what could be wrong, so I hope someone can give me an advice




pd: sorry if some nodes are in spanish, the true is that for me would be easier to have them in english but I dont know how to change the language yet

I stumbled upon this post, because I was looking for help how to zoom with axis mappings. In the end I found my own solution and just wanted to share it.

Just use for an axis mapping “Mouse Wheel Axis” as input and use a scale of -1.0.

For ThirdPerson

Mouse Wheel Axis (and other asix for that matter) return one of these three values:

  • 1.0
  • 0.0
  • -1.0

Assuming we are working with variables we can just do this simple calculation to get rid of writing the same code twice and keep ourselves DRY:
newBoomArmLength = zoomSensitivity * axisValue + currentBoomArmLength
This is so that we don’t get 0.0 but rather the currentBoomArmLength when we get 0.0 as an axis-value.

If you don’t want any smoothing you can of course do away with the Event Tick code

This is the blueprint code: