diff options
author | fabriceci <fabricecipolla@gmail.com> | 2021-08-13 00:41:40 +0200 |
---|---|---|
committer | fabriceci <fabricecipolla@gmail.com> | 2021-08-15 12:53:29 +0200 |
commit | d776b6c1547973c7d8e212d8ea439e78d91b1579 (patch) | |
tree | 075afd23435a82b331b97cb8ed788a3db3ba709e /doc/classes/KinematicCollision2D.xml | |
parent | 57e16812a1a4b89058de29e81247351afdd09087 (diff) |
API improvement on physics, mainly CharacterBody
Changes:
- Rename few methods/property and group them in the editor when it's possible
- Make MotionResult API consistency with KinematicCollision
- Return a boolean in move_and_slide if there was a collision
- New methods:
- get_floor_angle on CharacterBody to get the floor angle.
- get_angle on KinematicCollision to get the collision angle.
- get_last_slide_collision to quickly get the latest collision of move_and_slide.
Diffstat (limited to 'doc/classes/KinematicCollision2D.xml')
-rw-r--r-- | doc/classes/KinematicCollision2D.xml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/classes/KinematicCollision2D.xml b/doc/classes/KinematicCollision2D.xml index d7999f1aa0..721b840e99 100644 --- a/doc/classes/KinematicCollision2D.xml +++ b/doc/classes/KinematicCollision2D.xml @@ -10,6 +10,13 @@ <tutorials> </tutorials> <methods> + <method name="get_angle" qualifiers="const"> + <return type="float" /> + <argument index="0" name="up_direction" type="Vector2" default="Vector2(0, -1)" /> + <description> + The collision angle according to [code]up_direction[/code], which is [code]Vector2.UP[/code] by default. This value is always positive. + </description> + </method> </methods> <members> <member name="collider" type="Object" setter="" getter="get_collider"> |