浏览代码

Merge pull request #110878 from Calinou/doc-node2d-move-local

Fix and improve `Node2D.move_local_{x,y}()` description
Thaddeus Crews 2 周之前
父节点
当前提交
e22d442bf6
共有 2 个文件被更改,包括 5 次插入5 次删除
  1. 4 4
      doc/classes/Node2D.xml
  2. 1 1
      doc/classes/Node3D.xml

+ 4 - 4
doc/classes/Node2D.xml

@@ -49,20 +49,20 @@
 				[param point] should not be the same as the node's position, otherwise the node always looks to the right.
 				[param point] should not be the same as the node's position, otherwise the node always looks to the right.
 			</description>
 			</description>
 		</method>
 		</method>
-		<method name="move_local_x">
+		<method name="move_local_x" keywords="translate_object_local">
 			<return type="void" />
 			<return type="void" />
 			<param index="0" name="delta" type="float" />
 			<param index="0" name="delta" type="float" />
 			<param index="1" name="scaled" type="bool" default="false" />
 			<param index="1" name="scaled" type="bool" default="false" />
 			<description>
 			<description>
-				Applies a local translation on the node's X axis based on the [method Node._process]'s [param delta]. If [param scaled] is [code]false[/code], normalizes the movement.
+				Applies a local translation on the node's X axis with the amount specified in [param delta]. If [param scaled] is [code]false[/code], normalizes the movement to occur independently of the node's [member scale].
 			</description>
 			</description>
 		</method>
 		</method>
-		<method name="move_local_y">
+		<method name="move_local_y" keywords="translate_object_local">
 			<return type="void" />
 			<return type="void" />
 			<param index="0" name="delta" type="float" />
 			<param index="0" name="delta" type="float" />
 			<param index="1" name="scaled" type="bool" default="false" />
 			<param index="1" name="scaled" type="bool" default="false" />
 			<description>
 			<description>
-				Applies a local translation on the node's Y axis based on the [method Node._process]'s [param delta]. If [param scaled] is [code]false[/code], normalizes the movement.
+				Applies a local translation on the node's Y axis with the amount specified in [param delta]. If [param scaled] is [code]false[/code], normalizes the movement to occur independently of the node's [member scale].
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="rotate">
 		<method name="rotate">

+ 1 - 1
doc/classes/Node3D.xml

@@ -275,7 +275,7 @@
 				[b]Note:[/b] Despite the naming convention, this operation is [b]not[/b] calculated in parent space for compatibility reasons. To translate in parent space, add [param offset] to the [member position] ([code]node_3d.position += offset[/code]).
 				[b]Note:[/b] Despite the naming convention, this operation is [b]not[/b] calculated in parent space for compatibility reasons. To translate in parent space, add [param offset] to the [member position] ([code]node_3d.position += offset[/code]).
 			</description>
 			</description>
 		</method>
 		</method>
-		<method name="translate_object_local">
+		<method name="translate_object_local" keywords="move_local">
 			<return type="void" />
 			<return type="void" />
 			<param index="0" name="offset" type="Vector3" />
 			<param index="0" name="offset" type="Vector3" />
 			<description>
 			<description>