fix: Bepu and InputSystem update order#2848
Merged
Eideren merged 1 commit intostride3d:masterfrom Aug 27, 2025
Merged
Conversation
Contributor
|
LGTM On a side note, would it make sense to create a PR tag for minor behaviour changes in code? I don't see this breaking anything but adding this with a specific note to releases may help existing users who may have done something specific with |
Doprez
approved these changes
Jul 22, 2025
Collaborator
Author
|
@Doprez Good idea, added Behavioral-Change |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Details
Set the update order for the
InputSystemto a non-zero value, it will now always run before other systems with unset order.Previously, users may inadvertently introduce a one-frame input latency to their scripts by creating the
ScriptSystembefore theInputSystem.Also provides a way for users to insert systems that may run after the
InputSystembut before theScriptSystemwithout touching those two systems or creating a custom game implementation.Given the above, moved the execution point of
Bepuearlier in the frame, beforeScriptSystemruns to make sure interpolated bodies update their positions before users may read them in update, but afterInputSystemotherwise users would be reading last frame's input when they implementComponents.ISimulationUpdate.The above will reduce/eliminate apparent stuttering with user script when moving objects based on physics object transforms.
Related Issue
None afaict.
Types of changes
Checklist