You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The update step is always 0 when Fusion is loaded, and then will become os.clock (in the case of RobloxExternal being used) upon next step, causing a massive jump. This in turn affects TweenScheduler/SpringScheduler in the main branch and ExternalTime in the push-pull-execution branch.
This causes any Tween or Spring made in the same frame that Fusion is loaded to jump to completion the next frame.
The text was updated successfully, but these errors were encountered:
TODO: This epoch may change between providers. We could investigate ways
of allowing providers to co-operate to keep the epoch the same, so that
monotonicity can be better preserved.
A system to preserve the time would fix not only this issue but also the issue of swapping external providers. When I discovered this bug about a week ago (didn't think about making an issue for some reason), I thought about a system which would allow this without requiring the providers to do much.
Currently, "now" is passed from the external provider to Fusion whenever an update step happens. For this idea to work, Fusion would need to be able to ask the external provider for "now."
Essentially, the idea is that Fusion has its own "standard time" that is used internally by Fusion, and each provider only needs to give Fusion its "local time." To translate from local time to standard time we can use a local and standard reference timestamp that we know mean the same timestamp. Simply subtract the local reference timestamp from the current timestamp and add that to the reference timestamp.
The easiest reference timestamps are when providers change. To get the standard reference, get the standard time using the old provider (if none exists, keep the previous standard reference). To get the local reference, ask the new provider for its current local time (if none exists, do nothing).
Both reference timestamps can start at 0. When the first provider is added, it will begin increasing monotonically.
The update step is always 0 when Fusion is loaded, and then will become
os.clock
(in the case ofRobloxExternal
being used) upon next step, causing a massive jump. This in turn affectsTweenScheduler
/SpringScheduler
in themain
branch andExternalTime
in thepush-pull-execution
branch.This causes any
Tween
orSpring
made in the same frame that Fusion is loaded to jump to completion the next frame.The text was updated successfully, but these errors were encountered: