mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 07:53:26 +00:00
Specified delta interaction in CharacterBody docs
This commit is contained in:
parent
8b4b93a82e
commit
bee392fcd2
2 changed files with 4 additions and 0 deletions
|
@ -141,6 +141,7 @@
|
|||
<return type="bool" />
|
||||
<description>
|
||||
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 [RigidBody2D], 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.
|
||||
This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed.
|
||||
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].
|
||||
|
@ -196,6 +197,7 @@
|
|||
</member>
|
||||
<member name="velocity" type="Vector2" setter="set_velocity" getter="get_velocity" default="Vector2(0, 0)">
|
||||
Current velocity vector in pixels per second, used and modified during calls to [method move_and_slide].
|
||||
This property should not be set to a value multiplied by [code]delta[/code], because this happens internally in [method move_and_slide]. Otherwise, the simulation will run at an incorrect speed.
|
||||
</member>
|
||||
<member name="wall_min_slide_angle" type="float" setter="set_wall_min_slide_angle" getter="get_wall_min_slide_angle" default="0.2617994">
|
||||
Minimum angle (in radians) where the body is allowed to slide when it encounters a wall. The default value equals 15 degrees. This property only affects movement when [member motion_mode] is [constant MOTION_MODE_FLOATING].
|
||||
|
|
|
@ -133,6 +133,7 @@
|
|||
<return type="bool" />
|
||||
<description>
|
||||
Moves the body based on [member velocity]. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [CharacterBody3D] or [RigidBody3D], 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.
|
||||
This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed.
|
||||
Modifies [member velocity] if a slide collision occurred. To get the latest collision call [method get_last_slide_collision], for more 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.
|
||||
Returns [code]true[/code] if the body collided, otherwise, returns [code]false[/code].
|
||||
|
@ -187,6 +188,7 @@
|
|||
</member>
|
||||
<member name="velocity" type="Vector3" setter="set_velocity" getter="get_velocity" default="Vector3(0, 0, 0)">
|
||||
Current velocity vector (typically meters per second), used and modified during calls to [method move_and_slide].
|
||||
This property should not be set to a value multiplied by [code]delta[/code], because this happens internally in [method move_and_slide]. Otherwise, the simulation will run at an incorrect speed.
|
||||
</member>
|
||||
<member name="wall_min_slide_angle" type="float" setter="set_wall_min_slide_angle" getter="get_wall_min_slide_angle" default="0.2617994">
|
||||
Minimum angle (in radians) where the body is allowed to slide when it encounters a wall. The default value equals 15 degrees. When [member motion_mode] is [constant MOTION_MODE_GROUNDED], it only affects movement if [member floor_block_on_wall] is [code]true[/code].
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue