Repository navigation
Apply batch position updates after angle changes - #322
Merged
Merged
Conversation
Owner
|
Thanks! |
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.
Setting position and angle together through the batch API can move a body away from the requested position when its center of gravity is offset. For example, saving a pose and restoring it after a change:
Read the position from its existing buffer location, then apply it after the angle. Changing angle rotates an offset body origin around its center of gravity. The buffer layout stays the same.
A separate native simulation compares batch resets with scalar angle/position updates for density-derived offset polygons. All 18 affected configurations now match the scalar reference exactly through 240 subsequent physics steps, including body state and world bounds; all 54 complete controls remain identical. The regression covers both pose-only and all-field updates, multiple bodies and unchanged buffer bytes.
The documented test runner reports 298 tests with two skips. Both unchanged upstream and this branch also print the same three swallowed
nan != nancallback assertions in the existing arbiter test; these remain unresolved. The affected batch tests pass, and Black accepts the changed test file.