Parcourir la source

Merge pull request #90460 from Gamepro5/master

Surface normals are not the same thing as collision normals for `move_and_slide()`
Rémi Verschelde il y a 1 an
Parent
commit
fa1164343b
2 fichiers modifiés avec 6 ajouts et 3 suppressions
  1. 4 2
      doc/classes/CharacterBody2D.xml
  2. 2 1
      doc/classes/CharacterBody3D.xml

+ 4 - 2
doc/classes/CharacterBody2D.xml

@@ -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">
@@ -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">

+ 2 - 1
doc/classes/CharacterBody3D.xml

@@ -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">