Przeglądaj źródła

Add note to reset physics interpolation on first frame (#11346)

* Added note letting users know they should reset physics interpolation on first frame object is created

* Removed (RID) from function name

* Apply suggestions from code review

---------

Co-authored-by: Hugo Locurcio <[email protected]>
Ian Vidal 1 tydzień temu
rodzic
commit
faee8ba436
1 zmienionych plików z 5 dodań i 0 usunięć
  1. 5 0
      tutorials/performance/using_servers.rst

+ 5 - 0
tutorials/performance/using_servers.rst

@@ -95,6 +95,11 @@ Creating a sprite
 This is an example of how to create a sprite from code and move it using the low-level
 :ref:`CanvasItem <class_CanvasItem>` API.
 
+.. note:: When creating canvas items using the RenderingServer, you should reset physics 
+          interpolation on the first frame using 
+          :ref:`RenderingServer.canvas_item_reset_physics_interpolation() <class_RenderingServer_method_canvas_item_reset_physics_interpolation>`.
+          This ensures proper synchronization between the rendering and physics systems.
+
 .. tabs::
  .. code-tab:: gdscript GDScript