Skip to content

Fix stale data impacting predictive interpolation#75

Merged
Extremelyd1 merged 3 commits into
Extremelyd1:mainfrom
fireb0rngg:feat/interpolation-fixes
May 30, 2026
Merged

Fix stale data impacting predictive interpolation#75
Extremelyd1 merged 3 commits into
Extremelyd1:mainfrom
fireb0rngg:feat/interpolation-fixes

Conversation

@fireb0rngg
Copy link
Copy Markdown
Contributor

Previously, this MonoBehaviour could be enabled holding stale data from the last time it was active. This resulted in an effect where, when a player entered a scene, their character would "flash" in an arbitrary location (from ForceSnap(_lastServerPosition) before their position updated to its correct location. This was mainly problematic in player vs. player games, where it would give away when a remote player is within a scene. Other changes are just minor cleanup.

Add OnDisable to clear init/sequence state when a player container returns to the pool, and move position/state seeding into OnEnable so a recycled container starts from the position SpawnPlayer set on the transform rather than leftover values from the previous player.
Replace hard-coded RTT/correction/decay numbers with the Good-tier entries from the existing tier arrays so the spawn-state baseline is consistent with the rest of the adaptive system.
Early-out of ManualUpdate before anything runs so nothing is integrated until the first authoritative server packet arrives.
Copy link
Copy Markdown
Owner

@Extremelyd1 Extremelyd1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks fireb0rn, this looks great!

@Extremelyd1 Extremelyd1 changed the title PredictiveInterpolation fixes Fix stale data impacting predictive interpolation May 30, 2026
@Extremelyd1 Extremelyd1 merged commit f883dbe into Extremelyd1:main May 30, 2026
3 checks passed
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.

3 participants