3rd Person Zoom Camera

Hi. This is my zoomable camera setup.
i just added +/- 20point to SpringArmComponent’s Target Arm Length. I used basic 3rdperson project from engine.
Camera animation is not smooth, any tips for that?

Not sure if you found an answer or not since you posted this, but I think a Lerp may be what you need to smooth it out. So I’d look into that if you’re still working on this :slight_smile:

Though you could always use a number like 5 instead of 20, as it would be harder to notice the jumping. Though it would move a lot slower lol.

Wisdomcube2000
I am still working on this :slight_smile:

Here is my update.

Hold right mouse button to rotate cam setup / 3rd person cam tepmlate based)

Interesting use of the compare float macro!
To get it to be smooth, use the InterpTo function on a tick. I did it by creating a variable like DesiredCameraDistance and I add/subtract to/from it with the mouse wheel, clamping it between a MinDistance and maxDistance variable. Then, each tick it calls the InterpTo using the DesiredDistance as the destination and the current spring arm length as the current.

Hope this makes sense!

For smoothing the Zoom here are pics on how I did this. What it does in every frame is checked for CameraIsZooming. This happens any time the Mouse Wheel is scrolled up/down. If we are zooming then go ahead and make any adjustments to the arm until the difference between Desired (mouse scrolled) and Current Boom Length is less than 2.0 units.

I use a Tick Event with a Sequence to update the camera each frame for these items.

  • Both Branches
  • Set CameraBoomCurrentLength
  • Set CameraBoomZoomDifference & Set CameraBoomTransitionValue

This is very adjustable to your personal taste.
Camera Min: 75.0
Camera Max: 600.0
ZoomValue: 20.0

Delta Event Seconds.png