mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
classref: Sync with latest 4.0-alpha
This commit is contained in:
@@ -55,8 +55,6 @@ Properties
|
||||
+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------+
|
||||
| :ref:`MotionMode<enum_CharacterBody3D_MotionMode>` | :ref:`motion_mode<class_CharacterBody3D_property_motion_mode>` | ``0`` |
|
||||
+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------+
|
||||
| :ref:`Vector3<class_Vector3>` | :ref:`motion_velocity<class_CharacterBody3D_property_motion_velocity>` | ``Vector3(0, 0, 0)`` |
|
||||
+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------+
|
||||
| :ref:`MovingPlatformApplyVelocityOnLeave<enum_CharacterBody3D_MovingPlatformApplyVelocityOnLeave>` | :ref:`moving_platform_apply_velocity_on_leave<class_CharacterBody3D_property_moving_platform_apply_velocity_on_leave>` | ``0`` |
|
||||
+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------+
|
||||
| :ref:`int<class_int>` | :ref:`moving_platform_floor_layers<class_CharacterBody3D_property_moving_platform_floor_layers>` | ``4294967295`` |
|
||||
@@ -67,6 +65,8 @@ Properties
|
||||
+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------+
|
||||
| :ref:`Vector3<class_Vector3>` | :ref:`up_direction<class_CharacterBody3D_property_up_direction>` | ``Vector3(0, 1, 0)`` |
|
||||
+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------+
|
||||
| :ref:`Vector3<class_Vector3>` | :ref:`velocity<class_CharacterBody3D_property_velocity>` | ``Vector3(0, 0, 0)`` |
|
||||
+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------+
|
||||
| :ref:`float<class_float>` | :ref:`wall_min_slide_angle<class_CharacterBody3D_property_wall_min_slide_angle>` | ``0.261799`` |
|
||||
+----------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------+
|
||||
|
||||
@@ -136,9 +136,9 @@ enum **MotionMode**:
|
||||
|
||||
enum **MovingPlatformApplyVelocityOnLeave**:
|
||||
|
||||
- **PLATFORM_VEL_ON_LEAVE_ALWAYS** = **0** --- Add the last platform velocity to the :ref:`motion_velocity<class_CharacterBody3D_property_motion_velocity>` when you leave a moving platform.
|
||||
- **PLATFORM_VEL_ON_LEAVE_ALWAYS** = **0** --- Add the last platform velocity to the :ref:`velocity<class_CharacterBody3D_property_velocity>` when you leave a moving platform.
|
||||
|
||||
- **PLATFORM_VEL_ON_LEAVE_UPWARD_ONLY** = **1** --- Add the last platform velocity to the :ref:`motion_velocity<class_CharacterBody3D_property_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.
|
||||
- **PLATFORM_VEL_ON_LEAVE_UPWARD_ONLY** = **1** --- Add the last platform velocity to the :ref:`velocity<class_CharacterBody3D_property_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.
|
||||
|
||||
- **PLATFORM_VEL_ON_LEAVE_NEVER** = **2** --- Do nothing when leaving a platform.
|
||||
|
||||
@@ -249,7 +249,7 @@ As long as the snapping vector is in contact with the ground and the body moves
|
||||
|
||||
If ``true``, the body will not slide on slopes when calling :ref:`move_and_slide<class_CharacterBody3D_method_move_and_slide>` when the body is standing still.
|
||||
|
||||
If ``false``, the body will slide on floor's slopes when :ref:`motion_velocity<class_CharacterBody3D_property_motion_velocity>` applies a downward force.
|
||||
If ``false``, the body will slide on floor's slopes when :ref:`velocity<class_CharacterBody3D_property_velocity>` applies a downward force.
|
||||
|
||||
----
|
||||
|
||||
@@ -285,22 +285,6 @@ Sets the motion mode which defines the behavior of :ref:`move_and_slide<class_Ch
|
||||
|
||||
----
|
||||
|
||||
.. _class_CharacterBody3D_property_motion_velocity:
|
||||
|
||||
- :ref:`Vector3<class_Vector3>` **motion_velocity**
|
||||
|
||||
+-----------+----------------------------+
|
||||
| *Default* | ``Vector3(0, 0, 0)`` |
|
||||
+-----------+----------------------------+
|
||||
| *Setter* | set_motion_velocity(value) |
|
||||
+-----------+----------------------------+
|
||||
| *Getter* | get_motion_velocity() |
|
||||
+-----------+----------------------------+
|
||||
|
||||
Current velocity vector (typically meters per second), used and modified during calls to :ref:`move_and_slide<class_CharacterBody3D_method_move_and_slide>`.
|
||||
|
||||
----
|
||||
|
||||
.. _class_CharacterBody3D_property_moving_platform_apply_velocity_on_leave:
|
||||
|
||||
- :ref:`MovingPlatformApplyVelocityOnLeave<enum_CharacterBody3D_MovingPlatformApplyVelocityOnLeave>` **moving_platform_apply_velocity_on_leave**
|
||||
@@ -381,6 +365,22 @@ Direction vector used to determine what is a wall and what is a floor (or a ceil
|
||||
|
||||
----
|
||||
|
||||
.. _class_CharacterBody3D_property_velocity:
|
||||
|
||||
- :ref:`Vector3<class_Vector3>` **velocity**
|
||||
|
||||
+-----------+----------------------+
|
||||
| *Default* | ``Vector3(0, 0, 0)`` |
|
||||
+-----------+----------------------+
|
||||
| *Setter* | set_velocity(value) |
|
||||
+-----------+----------------------+
|
||||
| *Getter* | get_velocity() |
|
||||
+-----------+----------------------+
|
||||
|
||||
Current velocity vector (typically meters per second), used and modified during calls to :ref:`move_and_slide<class_CharacterBody3D_method_move_and_slide>`.
|
||||
|
||||
----
|
||||
|
||||
.. _class_CharacterBody3D_property_wall_min_slide_angle:
|
||||
|
||||
- :ref:`float<class_float>` **wall_min_slide_angle**
|
||||
@@ -450,7 +450,7 @@ Returns the travel (position delta) that occurred during the last call to :ref:`
|
||||
|
||||
- :ref:`Vector3<class_Vector3>` **get_real_velocity** **(** **)** |const|
|
||||
|
||||
Returns the current real velocity since the last call to :ref:`move_and_slide<class_CharacterBody3D_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 :ref:`motion_velocity<class_CharacterBody3D_property_motion_velocity>` which returns the requested velocity.
|
||||
Returns the current real velocity since the last call to :ref:`move_and_slide<class_CharacterBody3D_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 :ref:`velocity<class_CharacterBody3D_property_velocity>` which returns the requested velocity.
|
||||
|
||||
----
|
||||
|
||||
@@ -530,9 +530,9 @@ Returns ``true`` if the body collided only with a wall on the last call of :ref:
|
||||
|
||||
- :ref:`bool<class_bool>` **move_and_slide** **(** **)**
|
||||
|
||||
Moves the body based on :ref:`motion_velocity<class_CharacterBody3D_property_motion_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 :ref:`RigidDynamicBody3D<class_RigidDynamicBody3D>`, 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.
|
||||
Moves the body based on :ref:`velocity<class_CharacterBody3D_property_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 :ref:`RigidDynamicBody3D<class_RigidDynamicBody3D>`, 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 :ref:`motion_velocity<class_CharacterBody3D_property_motion_velocity>` if a slide collision occurred. To get the latest collision call :ref:`get_last_slide_collision<class_CharacterBody3D_method_get_last_slide_collision>`, for more detailed information about collisions that occurred, use :ref:`get_slide_collision<class_CharacterBody3D_method_get_slide_collision>`.
|
||||
Modifies :ref:`velocity<class_CharacterBody3D_property_velocity>` if a slide collision occurred. To get the latest collision call :ref:`get_last_slide_collision<class_CharacterBody3D_method_get_last_slide_collision>`, for more detailed information about collisions that occurred, use :ref:`get_slide_collision<class_CharacterBody3D_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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user