-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Physics interpolation docs #5801
Conversation
40ef0ce
to
46c7f6a
Compare
tutorials/physics/interpolation/advanced_physics_interpolation.rst
Outdated
Show resolved
Hide resolved
tutorials/physics/interpolation/advanced_physics_interpolation.rst
Outdated
Show resolved
Hide resolved
tutorials/physics/interpolation/advanced_physics_interpolation.rst
Outdated
Show resolved
Hide resolved
tutorials/physics/interpolation/advanced_physics_interpolation.rst
Outdated
Show resolved
Hide resolved
tutorials/physics/interpolation/advanced_physics_interpolation.rst
Outdated
Show resolved
Hide resolved
tutorials/physics/interpolation/advanced_physics_interpolation.rst
Outdated
Show resolved
Hide resolved
tutorials/physics/interpolation/advanced_physics_interpolation.rst
Outdated
Show resolved
Hide resolved
tutorials/physics/interpolation/advanced_physics_interpolation.rst
Outdated
Show resolved
Hide resolved
tutorials/physics/interpolation/advanced_physics_interpolation.rst
Outdated
Show resolved
Hide resolved
tutorials/physics/interpolation/advanced_physics_interpolation.rst
Outdated
Show resolved
Hide resolved
tutorials/physics/interpolation/physics_interpolation_introduction.rst
Outdated
Show resolved
Hide resolved
tutorials/physics/interpolation/physics_interpolation_introduction.rst
Outdated
Show resolved
Hide resolved
tutorials/physics/interpolation/physics_interpolation_introduction.rst
Outdated
Show resolved
Hide resolved
tutorials/physics/interpolation/physics_interpolation_introduction.rst
Outdated
Show resolved
Hide resolved
tutorials/physics/interpolation/physics_interpolation_introduction.rst
Outdated
Show resolved
Hide resolved
tutorials/physics/interpolation/physics_interpolation_introduction.rst
Outdated
Show resolved
Hide resolved
tutorials/physics/interpolation/physics_interpolation_introduction.rst
Outdated
Show resolved
Hide resolved
tutorials/physics/interpolation/physics_interpolation_introduction.rst
Outdated
Show resolved
Hide resolved
tutorials/physics/interpolation/physics_interpolation_introduction.rst
Outdated
Show resolved
Hide resolved
tutorials/physics/interpolation/physics_interpolation_introduction.rst
Outdated
Show resolved
Hide resolved
tutorials/physics/interpolation/physics_interpolation_introduction.rst
Outdated
Show resolved
Hide resolved
tutorials/physics/interpolation/physics_interpolation_introduction.rst
Outdated
Show resolved
Hide resolved
tutorials/physics/interpolation/physics_interpolation_quick_start_guide.rst
Outdated
Show resolved
Hide resolved
tutorials/physics/interpolation/physics_interpolation_quick_start_guide.rst
Outdated
Show resolved
Hide resolved
tutorials/physics/interpolation/using_physics_interpolation.rst
Outdated
Show resolved
Hide resolved
tutorials/physics/interpolation/using_physics_interpolation.rst
Outdated
Show resolved
Hide resolved
tutorials/physics/interpolation/using_physics_interpolation.rst
Outdated
Show resolved
Hide resolved
tutorials/physics/interpolation/using_physics_interpolation.rst
Outdated
Show resolved
Hide resolved
Ensure that all indirect movement happens during physics ticks | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
Consider that in Godot, Nodes can be moved not just directly in your own scripts, but also by automatic methods such as tweening, animation, and navigation. All these methods *must also* have their timing set to operate on the physics tick rather than each frame ("idle"). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By the way, this can be a problem for animations that change both a transform and a color at the same time. Physics interpolation only affects transforms, not other properties such as modulation or opacity.
See also godotengine/godot#51318 which is what could happen if you use a low physics tick rate and an AnimationPlayer running on the physics tick.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes absolutely there are a number of cases like this. Ideally almost everything in the engine would have the capability for interpolation. It is also particularly important for sound, to avoid harsh clicking as objects move around (I don't know whether this is dealt with already in the audio with some kind of interpolation).
This is also another plus point for calling it "fixed timestep interpolation" rather than physics interpolation, but I guess that ship has sailed. 😀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've now changed this to make this a bit clearer and add the caveat that you point out that they can also be used to animate properties that are not interpolated.
tutorials/physics/interpolation/using_physics_interpolation.rst
Outdated
Show resolved
Hide resolved
tutorials/physics/interpolation/using_physics_interpolation.rst
Outdated
Show resolved
Hide resolved
tutorials/physics/interpolation/using_physics_interpolation.rst
Outdated
Show resolved
Hide resolved
tutorials/physics/interpolation/using_physics_interpolation.rst
Outdated
Show resolved
Hide resolved
tutorials/physics/interpolation/using_physics_interpolation.rst
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be good to merge after applying suggestions.
b344e16
to
4085b0a
Compare
No idea whether the CSV thing will work on RTD too, lets check. :P |
These could be improved loads I'm sure (especially more and better illustrations, so I'd welcome any by anyone else, I'm not very expert at this), and maybe be made more concise, but it should be okay to get started.
Notes
using_physics_interpolation.rst
, this might need checking we support this (worked fine on mine)