Smoothing a transition of a camera between two points?

Timeline + interpolation should achieve your goal. Probably you had something set up incorrectly, and that led to the unexpected result. Can you please show the blueprint with the timeline?

This is what I have. Without deleting the float and bool settings, is there a way to make the camera move smoothly between point a (0,0,0) to point b (100,0,0) and back to point A (0,0,0) at the push and release of a button.

I’ve tried a few methods, and they all have failed so far. For example, one method involving a interp and a timeline made it zoom forever and only come back a small amount, or another which I forgot how I did worked the way I wanted it but only once and then wouldn’t trigger again no matter how many times I pushed the aim button.

Any help would be appreciated, and I will be sure to give credit where credit is due. Thanks for taking the time to read this and double thanks to anyone who provides any input. Hopefully we can get this working together. :slight_smile:

Timelines! It worked! Thanks! I’ll post the blueprint I just made in the answers and explain the flow behind it!

I know it doesn’t look too elegant, but here’s how I was able to do it! Thanks to Rizzin for giving me the idea of timelines, I fooled around with them for a bit and found a script that worked!

Here’s the workflow!

  1. Press the button to activate the “Is Aim Clicked” bool.
  2. Then it activates the aim_on timeline which has a transform output
  3. When it updates, it sets the opacity of the cursor to 1.
  4. Once the opacity is set, the local offset of the follow camera is transformed according to the aim-on transform.
  5. Once 2 seconds have expired, it sets the “is aiming” bool to true, then activates the branch.
  6. As a failsafe for someone just tapping the aim button and releasing it before the aim finishes, it’ll go to a branch where if the “is aim clicked” bool is false, such as the situation stated earlier, it will loop back to the Aim_Off timeline.
  7. If the aim button is released at any time, it will activate the aim_off timeline as long as they aren’t mid aiming
  8. Deactivate the is Aim Clicked bool
  9. In the Aim_off timeline, I’ve made it reversed in half the time with negative double the values.
  10. Set the cursor alpha to 0.
  11. Add the local offset from the aim_off transform timeline to the follow camera.
  12. And then after the timeline is finished, set the is aiming bool to false.
  13. DONE! PROFIT!

Feel free to use this script in any way shape and form, you can edit it to your liking, or use it as is, no credit needed since it’s so simple!

Just two quick comments about this BP:

  1. Instead of having two timelines you could use only one, and use Play from Start pin for “aim on”, and Reverse from End pin for “aim off”
  2. It would make more sense to set cursor alpha right before playing the timeline in this case. This action has to be done only once, but in your BP it is done during every timeline update

Those are not functional changes, just aesthetical.