Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.x] Clarify the difference between Vector2/3's reflect() and bounce() #68393

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion doc/classes/Vector2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@
<return type="Vector2" />
<argument index="0" name="n" type="Vector2" />
<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 [code]n[/code].
[b]Note:[/b] [method bounce] performs [i]physical[/i] reflection, as opposed to [method reflect] which performs [i]mathematical[/i] reflection. Double-check which method you actually need to use, as other engines may use these terms differently.
</description>
</method>
<method name="ceil">
Expand Down Expand Up @@ -220,6 +221,7 @@
<argument index="0" name="n" type="Vector2" />
<description>
Returns the vector reflected (i.e. mirrored, or symmetric) over a line defined by the given direction vector [code]n[/code].
[b]Note:[/b] [method reflect] performs [i]mathematical[/i] reflection, as opposed to [method bounce] which performs [i]physical[/i] reflection. Double-check which method you actually need to use, as other engines may use these terms differently.
</description>
</method>
<method name="rotated">
Expand Down
6 changes: 4 additions & 2 deletions doc/classes/Vector3.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
<return type="Vector3" />
<argument 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 [code]n[/code].
[b]Note:[/b] [method bounce] performs [i]physical[/i] reflection, as opposed to [method reflect] which performs [i]mathematical[/i] reflection.
</description>
</method>
<method name="ceil">
Expand Down Expand Up @@ -211,7 +212,8 @@
<return type="Vector3" />
<argument index="0" name="n" type="Vector3" />
<description>
Returns this vector reflected from a plane defined by the given normal.
Returns the vector reflected (i.e. mirrored, or symmetric) over a plane defined by the given direction vector [code]n[/code].
[b]Note:[/b] [method reflect] performs [i]mathematical[/i] reflection, as opposed to [method bounce] which performs [i]physical[/i] reflection. Double-check which method you actually need to use, as other engines may use these terms differently.
</description>
</method>
<method name="rotated">
Expand Down