Skip to content

Commit

Permalink
Merge pull request #90460 from Gamepro5/master
Browse files Browse the repository at this point in the history
Surface normals are not the same thing as collision normals for `move_and_slide()`
  • Loading branch information
akien-mga committed Apr 10, 2024
2 parents 5c75fa2 + 4799459 commit fa11643
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions doc/classes/CharacterBody2D.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
<method name="get_floor_normal" qualifiers="const">
<return type="Vector2" />
<description>
Returns the surface normal of the floor at the last collision point. Only valid after calling [method move_and_slide] and when [method is_on_floor] returns [code]true[/code].
Returns the collision normal of the floor at the last collision point. Only valid after calling [method move_and_slide] and when [method is_on_floor] returns [code]true[/code].
[b]Warning:[/b] The collision normal is not always the same as the surface normal.
</description>
</method>
<method name="get_last_motion" qualifiers="const">
Expand Down Expand Up @@ -94,7 +95,8 @@
<method name="get_wall_normal" qualifiers="const">
<return type="Vector2" />
<description>
Returns the surface normal of the wall at the last collision point. Only valid after calling [method move_and_slide] and when [method is_on_wall] returns [code]true[/code].
Returns the collision normal of the wall at the last collision point. Only valid after calling [method move_and_slide] and when [method is_on_wall] returns [code]true[/code].
[b]Warning:[/b] The collision normal is not always the same as the surface normal.
</description>
</method>
<method name="is_on_ceiling" qualifiers="const">
Expand Down
3 changes: 2 additions & 1 deletion doc/classes/CharacterBody3D.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@
<method name="get_wall_normal" qualifiers="const">
<return type="Vector3" />
<description>
Returns the surface normal of the wall at the last collision point. Only valid after calling [method move_and_slide] and when [method is_on_wall] returns [code]true[/code].
Returns the collision normal of the wall at the last collision point. Only valid after calling [method move_and_slide] and when [method is_on_wall] returns [code]true[/code].
[b]Warning:[/b] The collision normal is not always the same as the surface normal.
</description>
</method>
<method name="is_on_ceiling" qualifiers="const">
Expand Down

0 comments on commit fa11643

Please sign in to comment.