World2D.xml 1.3 KB

123456789101112131415161718192021222324252627
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="World2D" inherits="Resource" version="3.4">
  3. <brief_description>
  4. Class that has everything pertaining to a 2D world.
  5. </brief_description>
  6. <description>
  7. Class that has everything pertaining to a 2D world. A physics space, a visual scenario and a sound space. 2D nodes register their resources into the current 2D world.
  8. </description>
  9. <tutorials>
  10. <link>https://docs.godotengine.org/en/3.3/tutorials/physics/ray-casting.html</link>
  11. </tutorials>
  12. <methods>
  13. </methods>
  14. <members>
  15. <member name="canvas" type="RID" setter="" getter="get_canvas">
  16. The [RID] of this world's canvas resource. Used by the [VisualServer] for 2D drawing.
  17. </member>
  18. <member name="direct_space_state" type="Physics2DDirectSpaceState" setter="" getter="get_direct_space_state">
  19. Direct access to the world's physics 2D space state. Used for querying current and potential collisions. When using multi-threaded physics, access is limited to [code]_physics_process(delta)[/code] in the main thread.
  20. </member>
  21. <member name="space" type="RID" setter="" getter="get_space">
  22. The [RID] of this world's physics space resource. Used by the [Physics2DServer] for 2D physics, treating it as both a space and an area.
  23. </member>
  24. </members>
  25. <constants>
  26. </constants>
  27. </class>