Clarify bounce and reflect docs and update param names

This commit is contained in:
clayjohn
2024-03-11 16:29:51 -07:00
committed by Rémi Verschelde
parent 6c57928063
commit c0d0bdc160
3 changed files with 12 additions and 8 deletions

View File

@@ -86,7 +86,8 @@
<return type="Vector3" />
<param index="0" name="n" type="Vector3" />
<description>
Returns the vector "bounced off" from a plane defined by the given normal.
Returns the vector "bounced off" from a plane defined by the given normal [param n].
[b]Note:[/b] [method bounce] performs the operation that most engines and frameworks call [code skip-lint]reflect()[/code].
</description>
</method>
<method name="ceil" qualifiers="const">
@@ -306,9 +307,10 @@
</method>
<method name="reflect" qualifiers="const">
<return type="Vector3" />
<param index="0" name="n" type="Vector3" />
<param index="0" name="direction" type="Vector3" />
<description>
Returns the result of reflecting the vector from a plane defined by the given normal [param n].
Returns the result of reflecting the vector from a plane defined by the given direction vector [param direction].
[b]Note:[/b] [method reflect] differs from what other engines and frameworks call [code skip-lint]reflect()[/code]. In other engines, [code skip-lint]reflect()[/code] takes a normal direction which is a direction perpendicular to the plane. In Godot, you specify a direction parallel to the plane. See also [method bounce] which does what most engines call [code skip-lint]reflect()[/code].
</description>
</method>
<method name="rotated" qualifiers="const">