Stutter in with transform interpolation on
Hey folks, I think I discovered a potential issue, check out this stuttering:
https://github.com/user-attachments/assets/98f599ef-7a94-494e-b5fa-a31cc684b4ae
Originally I thought it was caused by the tnua library (https://github.com/idanarye/bevy-tnua/issues/78) but the author said tnua doesn't mutate the transform, and the velocity remains constant. This makes us think that might be an Avian bug.
I followed these steps to reproduce: Cloned tnua from: https://github.com/idanarye/bevy-tnua
On Windows 11, ran the demo with this command (set the wgpu backend env var to prevent log noise in the terminal):
$env:WGPU_BACKEND="dx12"; cargo run --bin platformer_2d --features avian2d
I've tried to debug, following these docs:
- Adding a
TransformExtrapolationandTransformInterpolationcomponent to thesetup_playerfunction infor_2d_platformer.rs - Changing the physics plugin addition
fn maininplatformer_2d.rsto
app.add_plugins(
PhysicsPlugins::new(FixedPostUpdate)
.set(avian2d::interpolation::PhysicsInterpolationPlugin::interpolate_all()),
);
But the stutter was still present.
Possibly related links:
- Bevy time jitter issue https://github.com/bevyengine/bevy/issues/4669
- Avian jitter issue https://github.com/Jondolf/avian/issues/211
- Bevy discord help thread: https://discord.com/channels/691052431525675048/1327424197298753666/1327424197298753666
Hypothesis: maybe it's the debug render who stutters?
I think it's Bevy time jitter issue