Skip to content

fix: Prevent resimulating physics ticks before bodies existed - #645

Open
realpoke wants to merge 1 commit into
foxssake:mainfrom
realpoke:fix/physics-resim-floor
Open

fix: Prevent resimulating physics ticks before bodies existed#645
realpoke wants to merge 1 commit into
foxssake:mainfrom
realpoke:fix/physics-resim-floor

Conversation

@realpoke

@realpoke realpoke commented Sep 4, 2026

Copy link
Copy Markdown

Bodies spawning mid-game (projectiles, pickups) were being resimulated from the earliest rollback tick, running physics states that predate their existence.

The driver now tracks the network_rigid_body group and raises a resim floor through the new NetworkRollback.notify_resim_floor() when a body first appears, so rollback never goes earlier than a body's spawn tick.
Rollback also starts from the frame's first tick so multi-tick frames replay their full physics sequence, and space snapshotting is skipped when rollback_physics_space is off.

Bodies that spawn mid-game (projectiles, pickups) were resimulated
from the earliest rollback tick, running them through physics states
that predate their existence.

Add a resim floor to NetworkRollback: drivers track bodies in the
network_rigid_body group and pin the earliest resimulable tick to the
tick a body first appeared in. Also guard space snapshotting behind
rollback_physics_space, and resim from the start of the frame's tick
loop so multi-tick frames replay their full physics sequence.
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