Skip to content

Latest commit

 

History

History
73 lines (46 loc) · 2.67 KB

class_world2d.rst

File metadata and controls

73 lines (46 loc) · 2.67 KB
github_url:hide

World2D

Inherits: :ref:`Resource<class_Resource>` < :ref:`Reference<class_Reference>` < :ref:`Object<class_Object>`

Class that has everything pertaining to a 2D world.

Description

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.

Tutorials

Properties

:ref:`RID<class_RID>` :ref:`canvas<class_World2D_property_canvas>`
:ref:`Physics2DDirectSpaceState<class_Physics2DDirectSpaceState>` :ref:`direct_space_state<class_World2D_property_direct_space_state>`
:ref:`RID<class_RID>` :ref:`space<class_World2D_property_space>`

Property Descriptions

Getter get_canvas()

The :ref:`RID<class_RID>` of this world's canvas resource. Used by the :ref:`VisualServer<class_VisualServer>` for 2D drawing.


Getter get_direct_space_state()

The state of this world's physics space. This allows arbitrary querying for collision.


Getter get_space()

The :ref:`RID<class_RID>` of this world's physics space resource. Used by the :ref:`Physics2DServer<class_Physics2DServer>` for 2D physics, treating it as both a space and an area.