I’m new to UE and I was trying to create a launchpad with a small animation using the timeline (it goes up and then down to the same spot where it started). The problem is that when the animation finishes to play, my launchpad doesn’t return to the same place and I can’t figure out why.
Before the animation plays
After the animation plays
Could someone help me out? Thanks in advance!
You need to connect your second timeline to the “Finished” pin of the first one, instead of doing it for each update.
But, on each update, you are adding an offset multiplied by the value of your timeline.
I am not sure that it is what you want.
What I would do is:
- GetActorLocation and save it to a local variable (StartLocation)
- Play your timeline
- On each update SetActorLocation with new location = StartLocation + timeline *3
Also, change your timeline to go from 0 to 1 then to 0. This way, you only need one timeline to do everything
I tried what you said and I managed to get it working the way I wanted to. I used the AddLocalActorOffset because I wanted to be able to rotate the object without changing the blueprint. Now it works, but only on the Z axis. By the way, I don’t even know why it work. Why does it go up and then in the opposite direction (down in this case) if I’m always multiplying by a positive number? Shouldn’t I multiply by a negative number if I want to go down?
By the way, thanks for you help
Look at the timeline. That’s where you give all the positions. It goes from 0 to 1 then to 0. Because you multiply it by 50, you’ll get all the relative positions from 0 to 50 then back to zero (relative to your start position).
Oh, now I understand. I interpreted it in a different way. Thanks again, you’re a legend!