Hello!
I’m trying to optimize my in game credits to get a smooth displacement, because it looks laggy.
I have a Widget which contains some stuff for the background and an Overlay in which I inject Widgets on the fly because our credits are data driven.
I’m using a WidgetPool, and made sure to never remove from parent, just change the position of an injected widget when it’s off screen and reset its texts.
(Type of widgets: First animated widget, Horizontal list for image(s), Simple text, Team List (3 rich texts: title, names, roles)…)
All those widgets contains an Invalidation box with the content under it.
I’ve disabled the Tick Frequency because I don’t need any animation, and disabled as well their Pixel Snapping (Note that with or without, it doesn’t change anything).
And I’m moving all my widgets by changing the Y position of their slots in a tick callback.
I’ve also tried to change the RenderTransform position instead but I have the same problem.
I took a video to check frame by frame if the widgets are moving on each frame but it’s not the case, it’s more like this:
Move, don’t move, move, move, don’t move, move, don’t move, don’t move, move… (A bit randomly)
So I’ve tried to not calculate any position and just force to change their position by one pixel on each frame (using FMath::Floor to ensure that the position is rounded) just to make sure it’s not a kind of pixel perfect issue, and I have the same result.
I’ve also took a trace with Insight and Slate insight activated, and I don’t see anything wrong, no weird spikes or anything.
My root container is invalidated all the time because I’m moving its childs, those childs are only invalidated when I change their content, and I never see them in the “Update” section because they all have an invalidation box.
I tried to use a FCurveSequence as well to receive the tick from elsewhere, tried to do some maths with a kind of fixed framerate, but nothing is working.
It doesn’t seems related to texts, because even a widget just containing an image is not refreshed properly on each tick.
I’ve then tried to force widget invalidation by calling InvalidateLayoutAndVolatility after moving the position on each frame, but still have this issue.
I saw since a while that pretty much all the games using UE are having this lagging issue in the credits, even in Fortnite I saw yesterday that it’s not perfect, so I’m wondering if there is any better solution or if we need to live with that problem?
Thanks!
[Attachment Removed]