We should introduce a plugin that handles interpolation of data.
Rationale
We decided to move away from lightyear, which means that we will soon not have client side interpolation of transforms and other data. Depending on the client's bandwidth, they might not get a high framerate of data from the server, and when they do it will have jitter. This will result in kinda janky poses.
Triage
This does not block other work because even without interpolation, we could just directly sync data from the latest server updates into the ecs.
Proposed design
I think we would model this after other prior art in this space, such as lightyear and bevy_easings. We might even be able to directly use bevy_easings instead, as one of the bevy maintainers (mockersf) wrote it.
The main question I have with bevy_easings is if it supports multiple samples for interpolation.
We should introduce a plugin that handles interpolation of data.
Rationale
We decided to move away from lightyear, which means that we will soon not have client side interpolation of transforms and other data. Depending on the client's bandwidth, they might not get a high framerate of data from the server, and when they do it will have jitter. This will result in kinda janky poses.
Triage
This does not block other work because even without interpolation, we could just directly sync data from the latest server updates into the ecs.
Proposed design
I think we would model this after other prior art in this space, such as
lightyear
andbevy_easings
. We might even be able to directly usebevy_easings
instead, as one of the bevy maintainers (mockersf) wrote it.The main question I have with bevy_easings is if it supports multiple samples for interpolation.
A potential API if we don't use
bevy_easings
:And then, the
InterpolatedComponent
trait should seek to use the easing functions and traits from theinterpolation
crate.