FTimeline instead of Tick

An FTimeline would be much more efficient for moving objects since it does not use Tick. It can do everything we just setup in this lesson for object movement.

Opening Doors in Unreal Engine | Unreal Engine 5.3 Documentation

1 Like

Yes, timeliness are often quite good for movement but sometimes they don’t offer enough flexibility.

The code is not complex so efficiency is not really a factor here. I check with the instructor before and he said he made the choice on a number of areas to do things simply and I suspect this was one of the areas he made this choice.

1 Like

He does go over Timers at one point and if you want you can go through and do it that way.
I think that’s what’s cool too about the course because he does do things in an overly simplistic way but that’s to prevent people from feeling overwhelmed and getting confused and frustrated. It also means though that if you feel up to the challenge that you can go ahead and take the extra steps to follow along while implementing it in your own way.

I’ve been implementing it in my own way and taking on the challenge to do things like this when I see an opportunity for them personally. I feel like it helps re-enforce what you have learned when you do it this way anyway.

NOTE: You can also simply Disable Tick by default and Enable/Disable when needed rather then setting a Timer and I imagine it would have a similar effect. I’m not personally aware of the performance differences so I don’t know which would be more performant.

1 Like

Thought I would come back and tell you that I actually did try this and had problems because the Character Movement is updated on a separate thread from that of the Timer, so it causes a situation where the Updates are so out of Sync that the Server (Or Player in Stand-Alone) will regularly clip in and out of the platform as it’s moving up. The Event Tick runs on the same thread and so the update order of operations prevents this from happening since they are in sync. The lower the fps the more obvious this desynchronization will be.

For me the problem was only visible on the Listen Server, or on the Player in Stand-Alone and not on Clients and I think this is simply because of the way replicated information is handled. I don’t know but I’m thinking maybe replicated data has it’s own tick or it all gets sent from the same tick. If that is the case then it would explain why for the Clients that wasn’t a problem since they are receiving the information from both and updating accordingly all within the same tick.

1 Like

Actually I think I’m wrong I looked back and it does run on the Game Thread. Timers still tick independent though since you can set their rate. So I guess the sync problem is actually related to when the timer is actually started. It seems the TimerManager is what keeps track of the Timers and that is what is ticking on the Game Thread. The Start/End and Intervals at which it ticks is likely all calculated on the fly when the Timer Manager Ticks I am guessing.

Privacy & Terms