From 849d34ba8ec6e46d449c7229fff2343062cf1667 Mon Sep 17 00:00:00 2001 From: Chris Bradfield Date: Mon, 21 Feb 2022 14:08:57 -0800 Subject: Rename motion_velocity to velocity --- doc/classes/CharacterBody2D.xml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'doc/classes/CharacterBody2D.xml') diff --git a/doc/classes/CharacterBody2D.xml b/doc/classes/CharacterBody2D.xml index f90c477f6d..28060f6579 100644 --- a/doc/classes/CharacterBody2D.xml +++ b/doc/classes/CharacterBody2D.xml @@ -55,7 +55,7 @@ - Returns the current real velocity since the last call to [method move_and_slide]. For example, when you climb a slope, you will move diagonally even though the velocity is horizontal. This method returns the diagonal movement, as opposed to [member motion_velocity] which returns the requested velocity. + Returns the current real velocity since the last call to [method move_and_slide]. For example, when you climb a slope, you will move diagonally even though the velocity is horizontal. This method returns the diagonal movement, as opposed to [member velocity] which returns the requested velocity. @@ -131,8 +131,8 @@ - Moves the body based on [member motion_velocity]. If the body collides with another, it will slide along the other body (by default only on floor) rather than stop immediately. If the other body is a [CharacterBody2D] or [RigidDynamicBody2D], it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes. - Modifies [member motion_velocity] if a slide collision occurred. To get the latest collision call [method get_last_slide_collision], for detailed information about collisions that occurred, use [method get_slide_collision]. + Moves the body based on [member velocity]. If the body collides with another, it will slide along the other body (by default only on floor) rather than stop immediately. If the other body is a [CharacterBody2D] or [RigidDynamicBody2D], it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes. + Modifies [member velocity] if a slide collision occurred. To get the latest collision call [method get_last_slide_collision], for detailed information about collisions that occurred, use [method get_slide_collision]. When the body touches a moving platform, the platform's velocity is automatically added to the body motion. If a collision occurs due to the platform's motion, it will always be first in the slide collisions. The general behavior and available properties change according to the [member motion_mode]. Returns [code]true[/code] if the body collided, otherwise, returns [code]false[/code]. @@ -162,7 +162,7 @@ If [code]true[/code], the body will not slide on slopes when calling [method move_and_slide] when the body is standing still. - If [code]false[/code], the body will slide on floor's slopes when [member motion_velocity] applies a downward force. + If [code]false[/code], the body will slide on floor's slopes when [member velocity] applies a downward force. Maximum number of times the body can change direction before it stops when calling [method move_and_slide]. @@ -170,9 +170,6 @@ Sets the motion mode which defines the behavior of [method move_and_slide]. See [enum MotionMode] constants for available modes. - - Current velocity vector in pixels per second, used and modified during calls to [method move_and_slide]. - Sets the behavior to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. See [enum MovingPlatformApplyVelocityOnLeave] constants for available behavior. @@ -188,6 +185,9 @@ Direction vector used to determine what is a wall and what is a floor (or a ceiling), rather than a wall, when calling [method move_and_slide]. Defaults to [code]Vector2.UP[/code]. If set to [code]Vector2(0, 0)[/code], everything is considered a wall. This is useful for topdown games. + + Current velocity vector in pixels per second, used and modified during calls to [method move_and_slide]. + Minimum angle (in radians) where the body is allowed to slide when it encounters a slope. The default value equals 15 degrees. This property only affects movement when [member motion_mode] is [constant MOTION_MODE_FLOATING]. @@ -200,10 +200,10 @@ Apply when there is no notion of floor or ceiling. All collisions will be reported as [code]on_wall[/code]. In this mode, when you slide, the speed will always be constant. This mode is suitable for top-down games. - Add the last platform velocity to the [member motion_velocity] when you leave a moving platform. + Add the last platform velocity to the [member velocity] when you leave a moving platform. - Add the last platform velocity to the [member motion_velocity] when you leave a moving platform, but any downward motion is ignored. It's useful to keep full jump height even when the platform is moving down. + Add the last platform velocity to the [member velocity] when you leave a moving platform, but any downward motion is ignored. It's useful to keep full jump height even when the platform is moving down. Do nothing when leaving a platform. -- cgit v1.2.3