Skip to content

Commit 40dde2a

Browse files
committed
Merge pull request #111139 from Calinou/doc-node2d-look-at-get-angle-to
Document link between `Node2D.look_at()` and `Node2D.get_angle_to()`
2 parents 3ef37d7 + 082766a commit 40dde2a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

doc/classes/Node2D.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
Multiplies the current scale by the [param ratio] vector.
2020
</description>
2121
</method>
22-
<method name="get_angle_to" qualifiers="const">
22+
<method name="get_angle_to" qualifiers="const" keywords="look_at">
2323
<return type="float" />
2424
<param index="0" name="point" type="Vector2" />
2525
<description>
26-
Returns the angle between the node and the [param point] in radians.
26+
Returns the angle between the node and the [param point] in radians. See also [method look_at].
2727
[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/node2d_get_angle_to.png]Illustration of the returned angle.[/url]
2828
</description>
2929
</method>
@@ -45,7 +45,7 @@
4545
<return type="void" />
4646
<param index="0" name="point" type="Vector2" />
4747
<description>
48-
Rotates the node so that its local +X axis points towards the [param point], which is expected to use global coordinates.
48+
Rotates the node so that its local +X axis points towards the [param point], which is expected to use global coordinates. This method is a combination of both [method rotate] and [method get_angle_to].
4949
[param point] should not be the same as the node's position, otherwise the node always looks to the right.
5050
</description>
5151
</method>
@@ -69,7 +69,7 @@
6969
<return type="void" />
7070
<param index="0" name="radians" type="float" />
7171
<description>
72-
Applies a rotation to the node, in radians, starting from its current rotation.
72+
Applies a rotation to the node, in radians, starting from its current rotation. This is equivalent to [code]rotation += radians[/code].
7373
</description>
7474
</method>
7575
<method name="to_global" qualifiers="const">
@@ -90,7 +90,7 @@
9090
<return type="void" />
9191
<param index="0" name="offset" type="Vector2" />
9292
<description>
93-
Translates the node by the given [param offset] in local coordinates.
93+
Translates the node by the given [param offset] in local coordinates. This is equivalent to [code]position += offset[/code].
9494
</description>
9595
</method>
9696
</methods>

0 commit comments

Comments
 (0)