Skip to content

Transfer supported Box2D bodies through rigid area portals - #698

Merged
EHotwagner merged 2 commits into
mainfrom
routine/game-portal-protected-20261004
Oct 4, 2026
Merged

EHotwagner merged 2 commits into
mainfrom
routine/game-portal-protected-20261004

Conversation

@EHotwagner

Copy link
Copy Markdown
Contributor

The Box2D adapter can move one supported whole body between independent area worlds through a rigid portal. Each world steps once before crossing collection; non-stepping staging preserves the source until destination creation succeeds, then commits entity ownership and publishes one traversal. Missing, blocked, full, joint-connected and invalid staging cases retain source ownership; uncertain effects stop the owner with best-effort actual-state inspection.

Preserves supported circle/box descriptors, material, momentum and current awake state. Exit hysteresis prevents immediate reverse traversal, and portal-aware interpolation snaps moved entities. Fixed Runtime filter/damping/sleep defaults remain the supported state boundary. Adds a real rotated two-area entry point, focused tests and generated adapter surface baselines.

Validation: the real Box2D.Portals entry passed with one body/entity/traversal, mapped position (9.9,5.15), velocity (-1,4), angular velocity 2, and exact five-tick replay under Box2D.NET 3.1.654, .NET runtime 10.0.12 and SDK 10.0.401. Pose/momentum tolerance is 2e-5; staging directly constructs rotation to avoid compounding the engine approximation. All 11 focused tests passed, including real staged-body cleanup under an explicitly injected commit interruption; that injection does not claim a native allocator failure. Complete 13-project solution build passed with zero warnings/errors; canonical refresh changed only adapter baselines. Native repository checks and merge readback remain pending; publication and installed support remain separate.

@EHotwagner
EHotwagner merged commit 75ff192 into main Oct 4, 2026
33 checks passed
@EHotwagner
EHotwagner deleted the routine/game-portal-protected-20261004 branch October 9, 2026 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant