"Physics Interpolation" jitter when updating Position

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Lajbert


I am new to Godot and doing the introduction 2D tutorial. I’m moving the sprite by updating its Position in the PhysicsProcess(). When I set the Physics FPS to 30 and turn on Physics Interpolation, the sprite moves visibly with 30 FPS, there is no smoothing at all. When I add my own simple interpolation code to interpolate between the previous and the current positions, it’s butter smooth. Is this feature currently buggy, or I’m doing something wrong?


:bust_in_silhouette: Reply From: SteveSmith

You don’t normally move physics object directly. Depending on what kind of physics object it is (Rigid, Kinematic etc…) you use something like move_and_slide() or move_and_collide().

I see. In case I don’t use physics to move my objects, then it’s up to me to interpolate. Thanks for the answer!

Lajbert | 2023-01-09 16:46

If you’re not using physics, I would use _process() instead of _physics_process().

SteveSmith | 2023-01-09 16:48