.. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/master/docs/gdscript/doc/classes/Node2D.xml. .. _class_Node2D: Node2D ====== **Inherits:** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` **Inherited By:** :ref:`AnimatedSprite2D`, :ref:`AudioListener2D`, :ref:`AudioStreamPlayer2D`, :ref:`BackBufferCopy`, :ref:`Bone2D`, :ref:`Camera2D`, :ref:`CanvasGroup`, :ref:`CanvasModulate`, :ref:`CollisionObject2D`, :ref:`CollisionPolygon2D`, :ref:`CollisionShape2D`, :ref:`CPUParticles2D`, :ref:`GPUParticles2D`, :ref:`Joint2D`, :ref:`Light2D`, :ref:`LightOccluder2D`, :ref:`Line2D`, :ref:`Marker2D`, :ref:`MeshInstance2D`, :ref:`MultiMeshInstance2D`, :ref:`NavigationLink2D`, :ref:`NavigationObstacle2D`, :ref:`NavigationRegion2D`, :ref:`Parallax2D`, :ref:`ParallaxLayer`, :ref:`Path2D`, :ref:`PathFollow2D`, :ref:`Polygon2D`, :ref:`RayCast2D`, :ref:`RemoteTransform2D`, :ref:`ShapeCast2D`, :ref:`Skeleton2D`, :ref:`Sprite2D`, :ref:`TileMap`, :ref:`TileMapLayer`, :ref:`TouchScreenButton`, :ref:`VisibleOnScreenNotifier2D` .. container:: contribute There is currently no description for this class. Please help us by :ref:`contributing one `! .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +---------------------------------------+-------------------------------------------------------------------------------+-------------------+ | :ref:`Vector2` | :ref:`global_position` | | +---------------------------------------+-------------------------------------------------------------------------------+-------------------+ | :ref:`float` | :ref:`global_rotation` | | +---------------------------------------+-------------------------------------------------------------------------------+-------------------+ | :ref:`float` | :ref:`global_rotation_degrees` | | +---------------------------------------+-------------------------------------------------------------------------------+-------------------+ | :ref:`Vector2` | :ref:`global_scale` | | +---------------------------------------+-------------------------------------------------------------------------------+-------------------+ | :ref:`float` | :ref:`global_skew` | | +---------------------------------------+-------------------------------------------------------------------------------+-------------------+ | :ref:`Transform2D` | :ref:`global_transform` | | +---------------------------------------+-------------------------------------------------------------------------------+-------------------+ | :ref:`Vector2` | :ref:`position` | ``Vector2(0, 0)`` | +---------------------------------------+-------------------------------------------------------------------------------+-------------------+ | :ref:`float` | :ref:`rotation` | ``0.0`` | +---------------------------------------+-------------------------------------------------------------------------------+-------------------+ | :ref:`float` | :ref:`rotation_degrees` | | +---------------------------------------+-------------------------------------------------------------------------------+-------------------+ | :ref:`Vector2` | :ref:`scale` | ``Vector2(1, 1)`` | +---------------------------------------+-------------------------------------------------------------------------------+-------------------+ | :ref:`float` | :ref:`skew` | ``0.0`` | +---------------------------------------+-------------------------------------------------------------------------------+-------------------+ | :ref:`Transform2D` | :ref:`transform` | | +---------------------------------------+-------------------------------------------------------------------------------+-------------------+ .. rst-class:: classref-reftable-group Methods ------- .. table:: :widths: auto +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`apply_scale` **(** :ref:`Vector2` ratio **)** | +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_angle_to` **(** :ref:`Vector2` point **)** |const| | +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform2D` | :ref:`get_relative_transform_to_parent` **(** :ref:`Node` parent **)** |const| | +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`global_translate` **(** :ref:`Vector2` offset **)** | +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`look_at` **(** :ref:`Vector2` point **)** | +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`move_local_x` **(** :ref:`float` delta, :ref:`bool` scaled=false **)** | +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`move_local_y` **(** :ref:`float` delta, :ref:`bool` scaled=false **)** | +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`rotate` **(** :ref:`float` radians **)** | +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`to_global` **(** :ref:`Vector2` local_point **)** |const| | +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`to_local` **(** :ref:`Vector2` global_point **)** |const| | +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`translate` **(** :ref:`Vector2` offset **)** | +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_Node2D_property_global_position: .. rst-class:: classref-property :ref:`Vector2` **global_position** .. rst-class:: classref-property-setget - void **set_global_position** **(** :ref:`Vector2` value **)** - :ref:`Vector2` **get_global_position** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Node2D_property_global_rotation: .. rst-class:: classref-property :ref:`float` **global_rotation** .. rst-class:: classref-property-setget - void **set_global_rotation** **(** :ref:`float` value **)** - :ref:`float` **get_global_rotation** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Node2D_property_global_rotation_degrees: .. rst-class:: classref-property :ref:`float` **global_rotation_degrees** .. rst-class:: classref-property-setget - void **set_global_rotation_degrees** **(** :ref:`float` value **)** - :ref:`float` **get_global_rotation_degrees** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Node2D_property_global_scale: .. rst-class:: classref-property :ref:`Vector2` **global_scale** .. rst-class:: classref-property-setget - void **set_global_scale** **(** :ref:`Vector2` value **)** - :ref:`Vector2` **get_global_scale** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Node2D_property_global_skew: .. rst-class:: classref-property :ref:`float` **global_skew** .. rst-class:: classref-property-setget - void **set_global_skew** **(** :ref:`float` value **)** - :ref:`float` **get_global_skew** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Node2D_property_global_transform: .. rst-class:: classref-property :ref:`Transform2D` **global_transform** .. rst-class:: classref-property-setget - void **set_global_transform** **(** :ref:`Transform2D` value **)** - :ref:`Transform2D` **get_global_transform** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Node2D_property_position: .. rst-class:: classref-property :ref:`Vector2` **position** = ``Vector2(0, 0)`` .. rst-class:: classref-property-setget - void **set_position** **(** :ref:`Vector2` value **)** - :ref:`Vector2` **get_position** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Node2D_property_rotation: .. rst-class:: classref-property :ref:`float` **rotation** = ``0.0`` .. rst-class:: classref-property-setget - void **set_rotation** **(** :ref:`float` value **)** - :ref:`float` **get_rotation** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Node2D_property_rotation_degrees: .. rst-class:: classref-property :ref:`float` **rotation_degrees** .. rst-class:: classref-property-setget - void **set_rotation_degrees** **(** :ref:`float` value **)** - :ref:`float` **get_rotation_degrees** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Node2D_property_scale: .. rst-class:: classref-property :ref:`Vector2` **scale** = ``Vector2(1, 1)`` .. rst-class:: classref-property-setget - void **set_scale** **(** :ref:`Vector2` value **)** - :ref:`Vector2` **get_scale** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Node2D_property_skew: .. rst-class:: classref-property :ref:`float` **skew** = ``0.0`` .. rst-class:: classref-property-setget - void **set_skew** **(** :ref:`float` value **)** - :ref:`float` **get_skew** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Node2D_property_transform: .. rst-class:: classref-property :ref:`Transform2D` **transform** .. rst-class:: classref-property-setget - void **set_transform** **(** :ref:`Transform2D` value **)** - :ref:`Transform2D` **get_transform** **(** **)** .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one `! .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_Node2D_method_apply_scale: .. rst-class:: classref-method void **apply_scale** **(** :ref:`Vector2` ratio **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Node2D_method_get_angle_to: .. rst-class:: classref-method :ref:`float` **get_angle_to** **(** :ref:`Vector2` point **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Node2D_method_get_relative_transform_to_parent: .. rst-class:: classref-method :ref:`Transform2D` **get_relative_transform_to_parent** **(** :ref:`Node` parent **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Node2D_method_global_translate: .. rst-class:: classref-method void **global_translate** **(** :ref:`Vector2` offset **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Node2D_method_look_at: .. rst-class:: classref-method void **look_at** **(** :ref:`Vector2` point **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Node2D_method_move_local_x: .. rst-class:: classref-method void **move_local_x** **(** :ref:`float` delta, :ref:`bool` scaled=false **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Node2D_method_move_local_y: .. rst-class:: classref-method void **move_local_y** **(** :ref:`float` delta, :ref:`bool` scaled=false **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Node2D_method_rotate: .. rst-class:: classref-method void **rotate** **(** :ref:`float` radians **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Node2D_method_to_global: .. rst-class:: classref-method :ref:`Vector2` **to_global** **(** :ref:`Vector2` local_point **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Node2D_method_to_local: .. rst-class:: classref-method :ref:`Vector2` **to_local** **(** :ref:`Vector2` global_point **)** |const| .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! .. rst-class:: classref-item-separator ---- .. _class_Node2D_method_translate: .. rst-class:: classref-method void **translate** **(** :ref:`Vector2` offset **)** .. container:: contribute There is currently no description for this method. Please help us by :ref:`contributing one `! .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`