Move camera in a while loop in the blueprint?

I’m trying to move the camera in small steps (0.05) until it reaches a certain point (y=0). I devised the blueprint below for this. But it immediately transforms the camera to y=0. When I remove the while loop, then the camera moves in small steps of 0.05. What gives? How can I resolve this?

use a timeline and lerp to

1 Like

Event Tick is not fixed: it can run one frame in 0.05 seconds and the next frame in 0.02 seconds, for example. Delta Seconds shows you the elapsed time between frames.

  1. You need to use Delta Seconds to move based on time.
    You can multiply the sum by Delta Seconds.

  2. While Loop will run in the same Tick until it reaches its condition, does not matter if it will take milliseconds or minutes to reach its end.
    In your example, Actor will move until it reaches 0.0 in one frame to stop the loop. So, in the next frame it will be in 0.0 position.

You can use Timeline too:

WTF Is? Timelines in Unreal Engine 4 ( UE4 )

1 Like