Skip to content

fix: Look up rapier physics states by cached tick tag - #647

Open
realpoke wants to merge 1 commit into
foxssake:mainfrom
realpoke:fix/rapier-driver-rollback-state
Open

fix: Look up rapier physics states by cached tick tag#647
realpoke wants to merge 1 commit into
foxssake:mainfrom
realpoke:fix/rapier-driver-rollback-state

Conversation

@realpoke

@realpoke realpoke commented Sep 4, 2026

Copy link
Copy Markdown

The rapier drivers derived the state index from the tick, but the rolling cache drops entries from the front once full and a tick can be cached more than once while history is rewritten, so the wrong state could be restored.

States are now looked up by their cached tag instead, and if the tick is no longer cached the space is left untouched. Applied to both 2D and 3D drivers, which remain opt-in (.off).

The rolling cache drops entries from the front once full, and a tick
can be cached more than once while history is rewritten, so deriving
the state index from the tick no longer matches what's stored.

Look up the state by its cached tag instead (rfind, oldest first), and
leave the space untouched if the tick is no longer cached.
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