-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update GlobalTransform
as part of FixedUpdate
#7836
Comments
WRT transform propagation, @inodentry has previously advocated for separating out a "physics transform" from a "rendering transform", and using interpolation to avoid visual hiccups. This is pretty compelling to me, but definitely doesn't seem compatible with the approach proposed here. |
I would also be interested in seeing if #7838 could be used to resolve these problems more gracefully. |
While writing this issue, I did think about suggesting a way to manually "flush" |
Yeah agreed: that's a nice catch that we may need to force separation by a collection of systems instead. |
In it's current state, transform propagation requires a full hierarchy traversal, this can be quite expensive, even if nothing changes, on large worlds. While this is probably needed for ECS-native physics simulation to work, I'm hesitant to suggest adding it now when the FixedUpdate schedule is empty by default, and runs potentially multiple times per frame. Ideally we should have some optimizations like #7840 before we enable this. |
IMO this isn't controversial, just not feasible performance-wise for now. |
What problem does this solve or what need does it fill?
The purpose of
FixedUpdate
and fixed timesteps in general is to improve determinism in systems, but any fixed update system relying onGlobalTransform
will currently suffer from a lack of determinism if it runs multiple times in 1 frame.What solution would you like?
GlobalTransform
should be updated between fixed updates.What alternative(s) have you considered?
Games could add these systems to
FixedUpdate
themselves. It's actually fairly easy to do already.The text was updated successfully, but these errors were encountered: