You can follow the link if you’re curious or want more informations but I will try to explain better here.
Besically if I use a timeline to an object in the world (in the level blueprint) there is no problem.
If I use the timeline in a class blueprint to move the object of the blueprint, it doesn’t work correctly. The first time it is triggered, the timeline is played too many times and after the first time the timeline is done once but I don’t think it’s correct either because the movement seem too fast. Also I just discovered that it is related to the frames per seconds.
4 differents gif of the same object triggered so you can see :
As you can see, each time it goes to a different location, it depend of the fps I have.
Now what happen after the first trigger :
This movement should be done in 2 seconds and not like this.
Don’t screem yet at me, this is the last thing I tried but I tried every set/add location possible, all the relative, world, local and actor so I’m 95% sure this is caused by the timeline and not the location, if you want to see some exemple of what I tried to do you can follow the first link.
The main problem I see with your setup is that you probably want to use “Play from Start” on your timeline instead of “Play”. This will make it play from the beginning of your curve every time. You can also put a Bool in there that will make it so you cannot trigger it again until the timeline has finished.
Also, just so you know, the “Update” output of a timeline is triggered every frame while the timeline is active. In your example, every frame for 2 seconds at 60 frames per second, it will trigger 120 times. This might be causing what you are seeing when your framerate is different.
There is probably a better way to achieve the behavior you want, but I’ll have to wait until later tonight to show you some examples.
[=]
The main problem I see with your setup is that you probably want to use “Play from Start” on your timeline instead of “Play”. This will make it play from the beginning of your curve every time. You can also put a Bool in there that will make it so you cannot trigger it again until the timeline has finished.
Also, just so you know, the “Update” output of a timeline is triggered every frame while the timeline is active. In your example, every frame for 2 seconds at 60 frames per second, it will trigger 120 times. This might be causing what you are seeing when your framerate is different.
There is probably a better way to achieve the behavior you want, but I’ll have to wait until later tonight to show you some examples.
[/]
Another problem you may run into with your current setup is you are continuing the timeline after the intended end. Make sure to “Use Last Keyframe” within the timeline to prevent the timeline from assuming a much longer timeperiod than intended.
Weird that none of the people (including myself) commenting in your previous thread spotted this rather obvious error. I guess we were all too focused on the more directly timeline-related errors.