Merge pull request #91376 from clayjohn/DOCS-reflect-vec3
Update the description and parameter name for Vector3 reflect to correct how the plane is constructed
This commit is contained in:
commit
4e30bc71f5
2 changed files with 4 additions and 4 deletions
|
@ -1896,7 +1896,7 @@ static void _register_variant_builtin_methods() {
|
||||||
bind_method(Vector3, project, sarray("b"), varray());
|
bind_method(Vector3, project, sarray("b"), varray());
|
||||||
bind_method(Vector3, slide, sarray("n"), varray());
|
bind_method(Vector3, slide, sarray("n"), varray());
|
||||||
bind_method(Vector3, bounce, sarray("n"), varray());
|
bind_method(Vector3, bounce, sarray("n"), varray());
|
||||||
bind_method(Vector3, reflect, sarray("direction"), varray());
|
bind_method(Vector3, reflect, sarray("n"), varray());
|
||||||
bind_method(Vector3, sign, sarray(), varray());
|
bind_method(Vector3, sign, sarray(), varray());
|
||||||
bind_method(Vector3, octahedron_encode, sarray(), varray());
|
bind_method(Vector3, octahedron_encode, sarray(), varray());
|
||||||
bind_static_method(Vector3, octahedron_decode, sarray("uv"), varray());
|
bind_static_method(Vector3, octahedron_decode, sarray("uv"), varray());
|
||||||
|
|
|
@ -307,10 +307,10 @@
|
||||||
</method>
|
</method>
|
||||||
<method name="reflect" qualifiers="const">
|
<method name="reflect" qualifiers="const">
|
||||||
<return type="Vector3" />
|
<return type="Vector3" />
|
||||||
<param index="0" name="direction" type="Vector3" />
|
<param index="0" name="n" type="Vector3" />
|
||||||
<description>
|
<description>
|
||||||
Returns the result of reflecting the vector from a plane defined by the given direction vector [param direction].
|
Returns the result of reflecting the vector through a plane defined by the given normal vector [param n].
|
||||||
[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].
|
[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] returns the result of the vector reflected by the given plane. The reflection thus passes through the given normal. While in Godot the reflection passes through the plane and can be thought of as bouncing off the normal. See also [method bounce] which does what most engines call [code skip-lint]reflect()[/code].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="rotated" qualifiers="const">
|
<method name="rotated" qualifiers="const">
|
||||||
|
|
Loading…
Reference in a new issue