-
-
Notifications
You must be signed in to change notification settings - Fork 23.8k
Description
Godot version:
3.2.1 and 3.2.2
OS/device including version:
Windows 10, 8Gb RAM, Nvdia Geforce 920M (Driver version 425.31), GLES3 (probably occurs in GLES2 as well)
Issue description:
The docs say to use move_and_* functions in _physics_process(), but there is an occasional jitter that happens around every 2-3 seconds. Using move_and_* in _process() however doesn't have jitter.
Steps to reproduce:
Any kind of KinematicBody2D node when moved with move_and_* in the _physics_process(), but i have included a project that shows a comparison between:
move_and_slide()used only in_physics_process()move_and_slide()used only in_process()- and ive also tried using
Engine.get_physics_interpolation_fraction()to interpolate aKinematicBody2Dthat moves in_physics_process()(my code for this is based on https://www.kinematicsoup.com/news/2016/8/9/rrypp5tkubynjwxhxjzd42s3o034o8)
On my laptop what i see is that 1. jitters occasionally, 2. doesnt jitter at all, 3. jitters really rarely, much less noticeable than 1.
Minimal reproduction project:
Interpolation.zip
I also have Interpolation.tscn as an Autoload, which was my implementation for the interpolation fractions, I then found Engine.get_physics_interpolation_fraction() is already provided in godot for this very reason. My InterpolatedTransform2D.tscn node has a boolean that lets you switch between my implementation and the Engine's version of interpolation fraction (both of them are identical afaik).