The Widget that animates will animate a rate slower relative the the phase count setting (ie phase of 2 = half speed, phase of 8, 1/8 speed),
While I would expect the retainer box phased to ether Skip the frames of an animation not in its phase count, slowing the animation down is completely unexpected. In addition retainer boxes do not pass on there delta time to blueprints instead using the delta time from the last frame, even if that frame was skipped. I Identified a Fix for the Blueprint Delta time issue, But it does not fix the animation slowdown.
On line 491 of SRetainerWidget.cpp it calls
const double TimeSinceLastDraw = FApp::GetCurrentTime() - LastDrawTime;
This code is unused, however if it is moved to int32 SRetainerWidget::OnPain at line 621 and inserted as the new DeltaTime the Blueprint Delta time of all the retainer boxes children will use the correct value.
const double TimeSinceLastDraw = FApp::GetCurrentTime() - LastDrawTime;
NewArgs.DeltaTime = TimeSinceLastDraw;
Any functionality using Delta time in the widget will now work correctly, the Animations built using the widget animator however seem to be excluded from this and run on there own time, I was not able to determine where or why it was happening this way.
[Attachment Removed]
Steps to Reproduce
Reproduction requires two widgets blueprints, The first contains a retainer box with a phase count set to greater than 1, The second is a child of the retainer box. In that widget it has animations setup for its parts.
Common UI is enabled in the example project but I do not believe it has any effect on the bug occurring or not.
Inside the ExampleProject there are 4 widgets, when played it will load into a map that spawns WBP_TestExample, the Left most one is nested inside a retainer box with its phase count set to 8 (this widget shows the issue), the Middle widget has no retainer boxes, and the Right most widget contains a retainer box inside itself at phase count of 8. All use an identical 1 second animation.
When the button is pressed the Middle and Right widget will take one second to animate while the Left most Widget takes 8 seconds.
[Attachment Removed]
Hi,
Your DeltaTime fix makes sense, I’ll see if I can get that checked into the engine on our end. Fixing animations will be a bit trickier, as they lean on Sequencer which has it’s own animation management logic. I’ll pass a note along to the team, but I don’t anticipate that being a simple fix as DeltaTime was. In the meantime, the best workaround may be to just disable Retain Render during the animation.
Best,
Cody
[Attachment Removed]