Change "Target Arm Length" of Boom Arm (Over Time)

Hello,

I am trying to make a blueprint in my “character blueprint” that produces the following result:

You press a button on the controller. And the third person camera zooms in to a “closer” position to the character (Taking about 2 seconds, so it’s smooth, not jolty). Then if you press the button again, the camera moves smoothly back to it’s original “farther” position. So it just keeps switching between the two. Kind of like Mario 64 when you hit the camera button, it transitions from a far camera position to a close camera position, smoothly… And vice versa.

I figure just change the Spring Arm’s “Target Arm Length” over 2 seconds when the button is pressed. And then when the button is pressed again, the Spring Arm’s “Target Arm Length” goes back to it’s original value over the course of about 2 seconds. Anyone have an idea of how to change that value over time, smoothly?

Any help would be greatly appreciated! :slight_smile:

There are numerous ways of achieving that but Timeline should give you enough control in most cases:

You can add a Timeline by RMB in the Event Graph and finding it in the context menu. f+ in the upper left corner will add a float track - it will be used to smoothly interpolate between 2 *keys *you’re going to set up.
Keys are added by shift+clicking in the Timeline graph. I set the 1st one to [Time: 0 / Value: 100] (that’s the minimal zoom) and the 2nd one to [Time: 2 / Value: 200] (full extended arm). This will interpolate a float value from 100 to 200 over 2s. The length of the entire Timeline has been set to 2s in the toolbar.
You can RMB a key and choose key interpolation method - in this case I’ve set it to Auto.
This setup should allow you to smoothly switch between 2 springarm lengths even if you interrupt the process by pressing C during transition.

1 Like

Thanks for this excellent tutorial.

OMG!!! THANK THANK YOU THANK YOU!!! This works perfectly!

There was a hiccup on the first button push since my camera default is the “far” position, so I just reversed the graph, and viola! Here is my final working result if anyone is interested! Thanks again, you seriously rock!!!