A 2D game object, parent of all 2D related nodes. Has a position, rotation, scale and Z-index.
</brief_description>
<description>
A 2D game object, with a position, rotation and scale. All 2D physics nodes and sprites inherit from Node2D. Use Node2D as a parent node to move, scale and rotate children in a 2D project. Also gives control on the node's render order.
</description>
<tutorials>
</tutorials>
<demos>
</demos>
<methods>
<methodname="apply_scale">
<returntype="void">
</return>
<argumentindex="0"name="ratio"type="Vector2">
</argument>
<description>
Multiplies the current scale by the 'ratio' vector.
</description>
</method>
<methodname="edit_set_pivot">
<returntype="void">
</return>
<argumentindex="0"name="pivot"type="Vector2">
</argument>
<description>
Set the pivot position of the 2D node to 'pivot' value. Only some Node2Ds implement this method.
</description>
</method>
<methodname="get_angle_to"qualifiers="const">
<returntype="float">
</return>
<argumentindex="0"name="point"type="Vector2">
</argument>
<description>
Returns the angle between the node and the 'point' in radians.
Apply a local translation on the node's Y axis based on the process's 'delta'. If 'scaled' is false, normalizes the movement.
</description>
</method>
<methodname="rotate">
<returntype="void">
</return>
<argumentindex="0"name="radians"type="float">
</argument>
<description>
Apply a rotation to the node, in radians, starting from its current rotation.
</description>
</method>
<methodname="set_global_position">
<returntype="void">
</return>
<argumentindex="0"name="pos"type="Vector2">
</argument>
<description>
Set the node's global position.
</description>
</method>
<methodname="set_global_rotation">
<returntype="void">
</return>
<argumentindex="0"name="radians"type="float">
</argument>
<description>
Set the node's global rotation in radians.
</description>
</method>
<methodname="set_global_rotation_in_degrees">
<returntype="void">
</return>
<argumentindex="0"name="degrees"type="float">
</argument>
<description>
Set the node's global rotation in degrees.
</description>
</method>
<methodname="set_global_scale">
<returntype="void">
</return>
<argumentindex="0"name="scale"type="Vector2">
</argument>
<description>
Set the node's global scale.
</description>
</method>
<methodname="set_global_transform">
<returntype="void">
</return>
<argumentindex="0"name="xform"type="Transform2D">
</argument>
<description>
Set the node's global [Transform2D].
</description>
</method>
<methodname="set_position">
<returntype="void">
</return>
<argumentindex="0"name="pos"type="Vector2">
</argument>
<description>
Set the node's position.
</description>
</method>
<methodname="set_rotation">
<returntype="void">
</return>
<argumentindex="0"name="radians"type="float">
</argument>
<description>
Set the node's rotation in radians.
</description>
</method>
<methodname="set_rotation_in_degrees">
<returntype="void">
</return>
<argumentindex="0"name="degrees"type="float">
</argument>
<description>
Set the node's rotation in degrees.
</description>
</method>
<methodname="set_scale">
<returntype="void">
</return>
<argumentindex="0"name="scale"type="Vector2">
</argument>
<description>
Set the node's scale.
</description>
</method>
<methodname="set_transform">
<returntype="void">
</return>
<argumentindex="0"name="xform"type="Transform2D">
</argument>
<description>
Set the node's local [Transform2D].
</description>
</method>
<methodname="set_z">
<returntype="void">
</return>
<argumentindex="0"name="z"type="int">
</argument>
<description>
Set the node's Z-index.
</description>
</method>
<methodname="set_z_as_relative">
<returntype="void">
</return>
<argumentindex="0"name="enable"type="bool">
</argument>
<description>
Make the node's Z-index relative to its parent's Z-index. If this node's Z-index is 2 and its parent's effective Z-index is 3, then this node's effective Z-index will be 2 + 3 = 5.
Make the node's Z-index relative to its parent's Z-index. If this node's Z-index is 2 and its parent's effective Z-index is 3, then this node's effective Z-index will be 2 + 3 = 5.