Skip to content

Interpolate per-tick entity movement on Bedrock - #6566

Open
darkcupid412 wants to merge 1 commit into
GeyserMC:masterfrom
darkcupid412:entity-move-interpolation
Open

Interpolate per-tick entity movement on Bedrock#6566
darkcupid412 wants to merge 1 commit into
GeyserMC:masterfrom
darkcupid412:entity-move-interpolation

Conversation

@darkcupid412

Copy link
Copy Markdown
Contributor

Absolute entity moves are not interpolated by the Bedrock client. An entity repositioned every tick through ClientboundTeleportEntityPacket or ClientboundEntityPositionSyncPacket snaps between positions, and anything riding it visibly drags behind. Send those updates as relative moves, which the client smooths. Client vehicles and long-range teleports keep the absolute path.

Fixes #6551

Absolute entity moves are not interpolated by the Bedrock client. An entity
repositioned every tick through ClientboundTeleportEntityPacket or
ClientboundEntityPositionSyncPacket snaps between positions, and anything
riding it visibly drags behind. Send those updates as relative moves, which
the client smooths. Client vehicles and long-range teleports keep the
absolute path.

Fixes GeyserMC#6551
@onebeastchris

Copy link
Copy Markdown
Member

Hey! Thanks for the PR.

It seems like we should use DATA_POS_ROT_INTERPOLATION_DURATION_ID to actually get the interpolation duration, as that also determines whether we should actually interpolate display entities (and then also for how long). We could probably implement that in DisplayBaseEntity - third parties that currently add their own implementation should be extending that as a base class anyways :p
Further, lerping / interpolating should probably be implemented similar to living entities by implementing Tickable, as we (and the Java client) shouldn't rely on an server-side update once per tick. May be worth abstracting the logic from the LivingEntity class into a separate handler, but, that's not required for this PR if you don't want to touch that 😄

We could also move shouldLerp higher to the Entity class - as that seems to be the same type of check we'd need here. That way we can avoid the new interpolatesTeleports method.

Let me know if you have further questions / need help with implementing these!

@onebeastchris onebeastchris added the PR: Feature When a PR implements a new feature label Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: Feature When a PR implements a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Movement of non-living entities (Display entities) isn't interpolated, causing visible drag for anything riding one

2 participants