Physics Interpolation - add helper warnings

When physics interpolation is active on a node, it is essential that transforms are updated during "_physics_process()" rather than "_process()" calls, for the interpolation to give the correct result.

This PR adds optional warnings for instances, cameras and multimeshes which can flag updates being incorrectly called, and thus make these problems much easier to fix.
This commit is contained in:
lawnjelly
2022-04-26 12:59:53 +01:00
parent 22d040dfb4
commit ad9b2b3794
4 changed files with 115 additions and 7 deletions

View File

@@ -414,6 +414,10 @@
<member name="debug/settings/gdscript/max_call_stack" type="int" setter="" getter="" default="1024">
Maximum call stack allowed for debugging GDScript.
</member>
<member name="debug/settings/physics_interpolation/enable_warnings" type="bool" setter="" getter="" default="true">
If [code]true[/code], enables warnings which can help pinpoint where nodes are being incorrectly updated, which will result in incorrect interpolation and visual glitches.
When a node is being interpolated, it is essential that the transform is set during [method Node._physics_process] (during a physics tick) rather than [method Node._process] (during a frame).
</member>
<member name="debug/settings/profiler/max_functions" type="int" setter="" getter="" default="16384">
Maximum amount of functions per frame allowed when profiling.
</member>