From 6ec4da2e3b6eeed5f6bc0d1a4f7e0a81147ea04e Mon Sep 17 00:00:00 2001 From: David Sichma Date: Wed, 17 Oct 2018 10:22:48 +0200 Subject: Fix inconsistency in KinematicBody - moved new infinite_inertia argument of move_and_slide and move_and_slide_with_snap in KinematicBody and KinematicBody2D to the end if not already there. This makes the order of arguments consistent and should keep projects from 3.0 compatible as this argument did not exist in 3.0. Docs updated accordingly. - renamed max_bounces to max_slides for consistency. Docs updated accordingly. - the argument infinite_inertia in test_move is now optional, as it is in every other movement related method. This closes #22829. --- doc/classes/KinematicBody.xml | 10 +++++----- doc/classes/KinematicBody2D.xml | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) (limited to 'doc/classes') diff --git a/doc/classes/KinematicBody.xml b/doc/classes/KinematicBody.xml index 82638fc57a..d5d8ebe712 100644 --- a/doc/classes/KinematicBody.xml +++ b/doc/classes/KinematicBody.xml @@ -106,13 +106,13 @@ - + - + - + - + Moves the body while keeping it attached to slopes. Similar to [method move_and_slide]. @@ -126,7 +126,7 @@ - + Checks for collisions without moving the body. Virtually sets the node's position, scale and rotation to that of the given [Transform], then tries to move the body along the vector [code]rel_vec[/code]. Returns [code]true[/code] if a collision would occur. diff --git a/doc/classes/KinematicBody2D.xml b/doc/classes/KinematicBody2D.xml index e48660a889..db775042cf 100644 --- a/doc/classes/KinematicBody2D.xml +++ b/doc/classes/KinematicBody2D.xml @@ -79,20 +79,20 @@ - + - + - + - + Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [code]KinematicBody2D[/code] or [RigidBody2D], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes. [code]linear_velocity[/code] is a value in pixels per second. Unlike in for example [method move_and_collide], you should [i]not[/i] multiply it with [code]delta[/code] — this is done by the method. [code]floor_normal[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector2(0, 0)[/code], everything is considered a wall. This is useful for topdown games. [i]TODO: Update for stop_on_slope argument.[/i] If the body is standing on a slope and the horizontal speed (relative to the floor's speed) goes below [code]slope_stop_min_velocity[/code], the body will stop completely. This prevents the body from sliding down slopes when you include gravity in [code]linear_velocity[/code]. When set to lower values, the body will not be able to stand still on steep slopes. - If the body collides, it will change direction a maximum of [code]max_bounces[/code] times before it stops. + If the body collides, it will change direction a maximum of [code]max_slides[/code] times before it stops. [code]floor_max_angle[/code] is the maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall. The default value equals 45 degrees. Returns the movement that remained when the body stopped. To get more detailed information about collisions that occurred, use [method get_slide_collision]. @@ -106,13 +106,13 @@ - + - + - + - + Moves the body while keeping it attached to slopes. Similar to [method move_and_slide]. @@ -126,7 +126,7 @@ - + Checks for collisions without moving the body. Virtually sets the node's position, scale and rotation to that of the given [Transform2D], then tries to move the body along the vector [code]rel_vec[/code]. Returns [code]true[/code] if a collision would occur. -- cgit v1.2.3