classref: Sync with current master branch (2e7fc81)

This commit is contained in:
Godot Organization
2024-02-24 03:20:02 +00:00
parent 4f21f44632
commit 8978497bb6
938 changed files with 42729 additions and 36889 deletions

View File

@@ -106,35 +106,35 @@ Methods
.. table::
:widths: auto
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`_integrate_forces<class_RigidBody3D_private_method__integrate_forces>` **(** :ref:`PhysicsDirectBodyState3D<class_PhysicsDirectBodyState3D>` state **)** |virtual| |
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`add_constant_central_force<class_RigidBody3D_method_add_constant_central_force>` **(** :ref:`Vector3<class_Vector3>` force **)** |
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`add_constant_force<class_RigidBody3D_method_add_constant_force>` **(** :ref:`Vector3<class_Vector3>` force, :ref:`Vector3<class_Vector3>` position=Vector3(0, 0, 0) **)** |
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`add_constant_torque<class_RigidBody3D_method_add_constant_torque>` **(** :ref:`Vector3<class_Vector3>` torque **)** |
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`apply_central_force<class_RigidBody3D_method_apply_central_force>` **(** :ref:`Vector3<class_Vector3>` force **)** |
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`apply_central_impulse<class_RigidBody3D_method_apply_central_impulse>` **(** :ref:`Vector3<class_Vector3>` impulse **)** |
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`apply_force<class_RigidBody3D_method_apply_force>` **(** :ref:`Vector3<class_Vector3>` force, :ref:`Vector3<class_Vector3>` position=Vector3(0, 0, 0) **)** |
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`apply_impulse<class_RigidBody3D_method_apply_impulse>` **(** :ref:`Vector3<class_Vector3>` impulse, :ref:`Vector3<class_Vector3>` position=Vector3(0, 0, 0) **)** |
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`apply_torque<class_RigidBody3D_method_apply_torque>` **(** :ref:`Vector3<class_Vector3>` torque **)** |
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`apply_torque_impulse<class_RigidBody3D_method_apply_torque_impulse>` **(** :ref:`Vector3<class_Vector3>` impulse **)** |
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Node3D[]<class_Node3D>` | :ref:`get_colliding_bodies<class_RigidBody3D_method_get_colliding_bodies>` **(** **)** |const| |
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_contact_count<class_RigidBody3D_method_get_contact_count>` **(** **)** |const| |
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Basis<class_Basis>` | :ref:`get_inverse_inertia_tensor<class_RigidBody3D_method_get_inverse_inertia_tensor>` **(** **)** |const| |
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_axis_velocity<class_RigidBody3D_method_set_axis_velocity>` **(** :ref:`Vector3<class_Vector3>` axis_velocity **)** |
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`_integrate_forces<class_RigidBody3D_private_method__integrate_forces>`\ (\ state\: :ref:`PhysicsDirectBodyState3D<class_PhysicsDirectBodyState3D>`\ ) |virtual| |
+----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`add_constant_central_force<class_RigidBody3D_method_add_constant_central_force>`\ (\ force\: :ref:`Vector3<class_Vector3>`\ ) |
+----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`add_constant_force<class_RigidBody3D_method_add_constant_force>`\ (\ force\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) |
+----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`add_constant_torque<class_RigidBody3D_method_add_constant_torque>`\ (\ torque\: :ref:`Vector3<class_Vector3>`\ ) |
+----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`apply_central_force<class_RigidBody3D_method_apply_central_force>`\ (\ force\: :ref:`Vector3<class_Vector3>`\ ) |
+----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`apply_central_impulse<class_RigidBody3D_method_apply_central_impulse>`\ (\ impulse\: :ref:`Vector3<class_Vector3>`\ ) |
+----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`apply_force<class_RigidBody3D_method_apply_force>`\ (\ force\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) |
+----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`apply_impulse<class_RigidBody3D_method_apply_impulse>`\ (\ impulse\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) |
+----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`apply_torque<class_RigidBody3D_method_apply_torque>`\ (\ torque\: :ref:`Vector3<class_Vector3>`\ ) |
+----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`apply_torque_impulse<class_RigidBody3D_method_apply_torque_impulse>`\ (\ impulse\: :ref:`Vector3<class_Vector3>`\ ) |
+----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>`\[:ref:`Node3D<class_Node3D>`\] | :ref:`get_colliding_bodies<class_RigidBody3D_method_get_colliding_bodies>`\ (\ ) |const| |
+----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_contact_count<class_RigidBody3D_method_get_contact_count>`\ (\ ) |const| |
+----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Basis<class_Basis>` | :ref:`get_inverse_inertia_tensor<class_RigidBody3D_method_get_inverse_inertia_tensor>`\ (\ ) |const| |
+----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_axis_velocity<class_RigidBody3D_method_set_axis_velocity>`\ (\ axis_velocity\: :ref:`Vector3<class_Vector3>`\ ) |
+----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
.. rst-class:: classref-section-separator
@@ -149,7 +149,7 @@ Signals
.. rst-class:: classref-signal
**body_entered** **(** :ref:`Node<class_Node>` body **)**
**body_entered**\ (\ body\: :ref:`Node<class_Node>`\ )
Emitted when a collision with another :ref:`PhysicsBody3D<class_PhysicsBody3D>` or :ref:`GridMap<class_GridMap>` occurs. Requires :ref:`contact_monitor<class_RigidBody3D_property_contact_monitor>` to be set to ``true`` and :ref:`max_contacts_reported<class_RigidBody3D_property_max_contacts_reported>` to be set high enough to detect all the collisions. :ref:`GridMap<class_GridMap>`\ s are detected if the :ref:`MeshLibrary<class_MeshLibrary>` has Collision :ref:`Shape3D<class_Shape3D>`\ s.
@@ -163,7 +163,7 @@ Emitted when a collision with another :ref:`PhysicsBody3D<class_PhysicsBody3D>`
.. rst-class:: classref-signal
**body_exited** **(** :ref:`Node<class_Node>` body **)**
**body_exited**\ (\ body\: :ref:`Node<class_Node>`\ )
Emitted when the collision with another :ref:`PhysicsBody3D<class_PhysicsBody3D>` or :ref:`GridMap<class_GridMap>` ends. Requires :ref:`contact_monitor<class_RigidBody3D_property_contact_monitor>` to be set to ``true`` and :ref:`max_contacts_reported<class_RigidBody3D_property_max_contacts_reported>` to be set high enough to detect all the collisions. :ref:`GridMap<class_GridMap>`\ s are detected if the :ref:`MeshLibrary<class_MeshLibrary>` has Collision :ref:`Shape3D<class_Shape3D>`\ s.
@@ -177,7 +177,7 @@ Emitted when the collision with another :ref:`PhysicsBody3D<class_PhysicsBody3D>
.. rst-class:: classref-signal
**body_shape_entered** **(** :ref:`RID<class_RID>` body_rid, :ref:`Node<class_Node>` body, :ref:`int<class_int>` body_shape_index, :ref:`int<class_int>` local_shape_index **)**
**body_shape_entered**\ (\ body_rid\: :ref:`RID<class_RID>`, body\: :ref:`Node<class_Node>`, body_shape_index\: :ref:`int<class_int>`, local_shape_index\: :ref:`int<class_int>`\ )
Emitted when one of this RigidBody3D's :ref:`Shape3D<class_Shape3D>`\ s collides with another :ref:`PhysicsBody3D<class_PhysicsBody3D>` or :ref:`GridMap<class_GridMap>`'s :ref:`Shape3D<class_Shape3D>`\ s. Requires :ref:`contact_monitor<class_RigidBody3D_property_contact_monitor>` to be set to ``true`` and :ref:`max_contacts_reported<class_RigidBody3D_property_max_contacts_reported>` to be set high enough to detect all the collisions. :ref:`GridMap<class_GridMap>`\ s are detected if the :ref:`MeshLibrary<class_MeshLibrary>` has Collision :ref:`Shape3D<class_Shape3D>`\ s.
@@ -197,7 +197,7 @@ Emitted when one of this RigidBody3D's :ref:`Shape3D<class_Shape3D>`\ s collides
.. rst-class:: classref-signal
**body_shape_exited** **(** :ref:`RID<class_RID>` body_rid, :ref:`Node<class_Node>` body, :ref:`int<class_int>` body_shape_index, :ref:`int<class_int>` local_shape_index **)**
**body_shape_exited**\ (\ body_rid\: :ref:`RID<class_RID>`, body\: :ref:`Node<class_Node>`, body_shape_index\: :ref:`int<class_int>`, local_shape_index\: :ref:`int<class_int>`\ )
Emitted when the collision between one of this RigidBody3D's :ref:`Shape3D<class_Shape3D>`\ s and another :ref:`PhysicsBody3D<class_PhysicsBody3D>` or :ref:`GridMap<class_GridMap>`'s :ref:`Shape3D<class_Shape3D>`\ s ends. Requires :ref:`contact_monitor<class_RigidBody3D_property_contact_monitor>` to be set to ``true`` and :ref:`max_contacts_reported<class_RigidBody3D_property_max_contacts_reported>` to be set high enough to detect all the collisions. :ref:`GridMap<class_GridMap>`\ s are detected if the :ref:`MeshLibrary<class_MeshLibrary>` has Collision :ref:`Shape3D<class_Shape3D>`\ s.
@@ -217,7 +217,7 @@ Emitted when the collision between one of this RigidBody3D's :ref:`Shape3D<class
.. rst-class:: classref-signal
**sleeping_state_changed** **(** **)**
**sleeping_state_changed**\ (\ )
Emitted when the physics engine changes the body's sleeping state.
@@ -323,8 +323,8 @@ Property Descriptions
.. rst-class:: classref-property-setget
- void **set_angular_damp** **(** :ref:`float<class_float>` value **)**
- :ref:`float<class_float>` **get_angular_damp** **(** **)**
- |void| **set_angular_damp**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_angular_damp**\ (\ )
Damps the body's rotation. By default, the body will use the **Default Angular Damp** in **Project > Project Settings > Physics > 3d** or any value override set by an :ref:`Area3D<class_Area3D>` the body is in. Depending on :ref:`angular_damp_mode<class_RigidBody3D_property_angular_damp_mode>`, you can set :ref:`angular_damp<class_RigidBody3D_property_angular_damp>` to be added to or to replace the body's damping value.
@@ -342,8 +342,8 @@ See :ref:`ProjectSettings.physics/3d/default_angular_damp<class_ProjectSettings_
.. rst-class:: classref-property-setget
- void **set_angular_damp_mode** **(** :ref:`DampMode<enum_RigidBody3D_DampMode>` value **)**
- :ref:`DampMode<enum_RigidBody3D_DampMode>` **get_angular_damp_mode** **(** **)**
- |void| **set_angular_damp_mode**\ (\ value\: :ref:`DampMode<enum_RigidBody3D_DampMode>`\ )
- :ref:`DampMode<enum_RigidBody3D_DampMode>` **get_angular_damp_mode**\ (\ )
Defines how :ref:`angular_damp<class_RigidBody3D_property_angular_damp>` is applied. See :ref:`DampMode<enum_RigidBody3D_DampMode>` for possible values.
@@ -359,8 +359,8 @@ Defines how :ref:`angular_damp<class_RigidBody3D_property_angular_damp>` is appl
.. rst-class:: classref-property-setget
- void **set_angular_velocity** **(** :ref:`Vector3<class_Vector3>` value **)**
- :ref:`Vector3<class_Vector3>` **get_angular_velocity** **(** **)**
- |void| **set_angular_velocity**\ (\ value\: :ref:`Vector3<class_Vector3>`\ )
- :ref:`Vector3<class_Vector3>` **get_angular_velocity**\ (\ )
The RigidBody3D's rotational velocity in *radians* per second.
@@ -376,8 +376,8 @@ The RigidBody3D's rotational velocity in *radians* per second.
.. rst-class:: classref-property-setget
- void **set_can_sleep** **(** :ref:`bool<class_bool>` value **)**
- :ref:`bool<class_bool>` **is_able_to_sleep** **(** **)**
- |void| **set_can_sleep**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **is_able_to_sleep**\ (\ )
If ``true``, the body can enter sleep mode when there is no movement. See :ref:`sleeping<class_RigidBody3D_property_sleeping>`.
@@ -393,8 +393,8 @@ If ``true``, the body can enter sleep mode when there is no movement. See :ref:`
.. rst-class:: classref-property-setget
- void **set_center_of_mass** **(** :ref:`Vector3<class_Vector3>` value **)**
- :ref:`Vector3<class_Vector3>` **get_center_of_mass** **(** **)**
- |void| **set_center_of_mass**\ (\ value\: :ref:`Vector3<class_Vector3>`\ )
- :ref:`Vector3<class_Vector3>` **get_center_of_mass**\ (\ )
The body's custom center of mass, relative to the body's origin position, when :ref:`center_of_mass_mode<class_RigidBody3D_property_center_of_mass_mode>` is set to :ref:`CENTER_OF_MASS_MODE_CUSTOM<class_RigidBody3D_constant_CENTER_OF_MASS_MODE_CUSTOM>`. This is the balanced point of the body, where applied forces only cause linear acceleration. Applying forces outside of the center of mass causes angular acceleration.
@@ -412,8 +412,8 @@ When :ref:`center_of_mass_mode<class_RigidBody3D_property_center_of_mass_mode>`
.. rst-class:: classref-property-setget
- void **set_center_of_mass_mode** **(** :ref:`CenterOfMassMode<enum_RigidBody3D_CenterOfMassMode>` value **)**
- :ref:`CenterOfMassMode<enum_RigidBody3D_CenterOfMassMode>` **get_center_of_mass_mode** **(** **)**
- |void| **set_center_of_mass_mode**\ (\ value\: :ref:`CenterOfMassMode<enum_RigidBody3D_CenterOfMassMode>`\ )
- :ref:`CenterOfMassMode<enum_RigidBody3D_CenterOfMassMode>` **get_center_of_mass_mode**\ (\ )
Defines the way the body's center of mass is set. See :ref:`CenterOfMassMode<enum_RigidBody3D_CenterOfMassMode>` for possible values.
@@ -429,8 +429,8 @@ Defines the way the body's center of mass is set. See :ref:`CenterOfMassMode<enu
.. rst-class:: classref-property-setget
- void **set_constant_force** **(** :ref:`Vector3<class_Vector3>` value **)**
- :ref:`Vector3<class_Vector3>` **get_constant_force** **(** **)**
- |void| **set_constant_force**\ (\ value\: :ref:`Vector3<class_Vector3>`\ )
- :ref:`Vector3<class_Vector3>` **get_constant_force**\ (\ )
The body's total constant positional forces applied during each physics update.
@@ -448,8 +448,8 @@ See :ref:`add_constant_force<class_RigidBody3D_method_add_constant_force>` and :
.. rst-class:: classref-property-setget
- void **set_constant_torque** **(** :ref:`Vector3<class_Vector3>` value **)**
- :ref:`Vector3<class_Vector3>` **get_constant_torque** **(** **)**
- |void| **set_constant_torque**\ (\ value\: :ref:`Vector3<class_Vector3>`\ )
- :ref:`Vector3<class_Vector3>` **get_constant_torque**\ (\ )
The body's total constant rotational forces applied during each physics update.
@@ -467,8 +467,8 @@ See :ref:`add_constant_torque<class_RigidBody3D_method_add_constant_torque>`.
.. rst-class:: classref-property-setget
- void **set_contact_monitor** **(** :ref:`bool<class_bool>` value **)**
- :ref:`bool<class_bool>` **is_contact_monitor_enabled** **(** **)**
- |void| **set_contact_monitor**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **is_contact_monitor_enabled**\ (\ )
If ``true``, the RigidBody3D will emit signals when it collides with another body.
@@ -486,8 +486,8 @@ If ``true``, the RigidBody3D will emit signals when it collides with another bod
.. rst-class:: classref-property-setget
- void **set_use_continuous_collision_detection** **(** :ref:`bool<class_bool>` value **)**
- :ref:`bool<class_bool>` **is_using_continuous_collision_detection** **(** **)**
- |void| **set_use_continuous_collision_detection**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **is_using_continuous_collision_detection**\ (\ )
If ``true``, continuous collision detection is used.
@@ -505,8 +505,8 @@ Continuous collision detection tries to predict where a moving body will collide
.. rst-class:: classref-property-setget
- void **set_use_custom_integrator** **(** :ref:`bool<class_bool>` value **)**
- :ref:`bool<class_bool>` **is_using_custom_integrator** **(** **)**
- |void| **set_use_custom_integrator**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **is_using_custom_integrator**\ (\ )
If ``true``, internal force integration will be disabled (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the :ref:`_integrate_forces<class_RigidBody3D_private_method__integrate_forces>` function, if defined.
@@ -522,8 +522,8 @@ If ``true``, internal force integration will be disabled (like gravity or air fr
.. rst-class:: classref-property-setget
- void **set_freeze_enabled** **(** :ref:`bool<class_bool>` value **)**
- :ref:`bool<class_bool>` **is_freeze_enabled** **(** **)**
- |void| **set_freeze_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **is_freeze_enabled**\ (\ )
If ``true``, the body is frozen. Gravity and forces are not applied anymore.
@@ -543,8 +543,8 @@ For a body that is always frozen, use :ref:`StaticBody3D<class_StaticBody3D>` or
.. rst-class:: classref-property-setget
- void **set_freeze_mode** **(** :ref:`FreezeMode<enum_RigidBody3D_FreezeMode>` value **)**
- :ref:`FreezeMode<enum_RigidBody3D_FreezeMode>` **get_freeze_mode** **(** **)**
- |void| **set_freeze_mode**\ (\ value\: :ref:`FreezeMode<enum_RigidBody3D_FreezeMode>`\ )
- :ref:`FreezeMode<enum_RigidBody3D_FreezeMode>` **get_freeze_mode**\ (\ )
The body's freeze mode. Can be used to set the body's behavior when :ref:`freeze<class_RigidBody3D_property_freeze>` is enabled. See :ref:`FreezeMode<enum_RigidBody3D_FreezeMode>` for possible values.
@@ -562,8 +562,8 @@ For a body that is always frozen, use :ref:`StaticBody3D<class_StaticBody3D>` or
.. rst-class:: classref-property-setget
- void **set_gravity_scale** **(** :ref:`float<class_float>` value **)**
- :ref:`float<class_float>` **get_gravity_scale** **(** **)**
- |void| **set_gravity_scale**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_gravity_scale**\ (\ )
This is multiplied by the global 3D gravity setting found in **Project > Project Settings > Physics > 3d** to produce RigidBody3D's gravity. For example, a value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object.
@@ -579,8 +579,8 @@ This is multiplied by the global 3D gravity setting found in **Project > Project
.. rst-class:: classref-property-setget
- void **set_inertia** **(** :ref:`Vector3<class_Vector3>` value **)**
- :ref:`Vector3<class_Vector3>` **get_inertia** **(** **)**
- |void| **set_inertia**\ (\ value\: :ref:`Vector3<class_Vector3>`\ )
- :ref:`Vector3<class_Vector3>` **get_inertia**\ (\ )
The body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body on each axis. The moment of inertia is usually computed automatically from the mass and the shapes, but this property allows you to set a custom value.
@@ -626,8 +626,8 @@ If set to :ref:`Vector3.ZERO<class_Vector3_constant_ZERO>`, inertia is automatic
.. rst-class:: classref-property-setget
- void **set_linear_damp** **(** :ref:`float<class_float>` value **)**
- :ref:`float<class_float>` **get_linear_damp** **(** **)**
- |void| **set_linear_damp**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_linear_damp**\ (\ )
Damps the body's movement. By default, the body will use the **Default Linear Damp** in **Project > Project Settings > Physics > 3d** or any value override set by an :ref:`Area3D<class_Area3D>` the body is in. Depending on :ref:`linear_damp_mode<class_RigidBody3D_property_linear_damp_mode>`, you can set :ref:`linear_damp<class_RigidBody3D_property_linear_damp>` to be added to or to replace the body's damping value.
@@ -645,8 +645,8 @@ See :ref:`ProjectSettings.physics/3d/default_linear_damp<class_ProjectSettings_p
.. rst-class:: classref-property-setget
- void **set_linear_damp_mode** **(** :ref:`DampMode<enum_RigidBody3D_DampMode>` value **)**
- :ref:`DampMode<enum_RigidBody3D_DampMode>` **get_linear_damp_mode** **(** **)**
- |void| **set_linear_damp_mode**\ (\ value\: :ref:`DampMode<enum_RigidBody3D_DampMode>`\ )
- :ref:`DampMode<enum_RigidBody3D_DampMode>` **get_linear_damp_mode**\ (\ )
Defines how :ref:`linear_damp<class_RigidBody3D_property_linear_damp>` is applied. See :ref:`DampMode<enum_RigidBody3D_DampMode>` for possible values.
@@ -662,8 +662,8 @@ Defines how :ref:`linear_damp<class_RigidBody3D_property_linear_damp>` is applie
.. rst-class:: classref-property-setget
- void **set_linear_velocity** **(** :ref:`Vector3<class_Vector3>` value **)**
- :ref:`Vector3<class_Vector3>` **get_linear_velocity** **(** **)**
- |void| **set_linear_velocity**\ (\ value\: :ref:`Vector3<class_Vector3>`\ )
- :ref:`Vector3<class_Vector3>` **get_linear_velocity**\ (\ )
The body's linear velocity in units per second. Can be used sporadically, but **don't set this every frame**, because physics may run in another thread and runs at a different granularity. Use :ref:`_integrate_forces<class_RigidBody3D_private_method__integrate_forces>` as your process loop for precise control of the body state.
@@ -679,8 +679,8 @@ The body's linear velocity in units per second. Can be used sporadically, but **
.. rst-class:: classref-property-setget
- void **set_lock_rotation_enabled** **(** :ref:`bool<class_bool>` value **)**
- :ref:`bool<class_bool>` **is_lock_rotation_enabled** **(** **)**
- |void| **set_lock_rotation_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **is_lock_rotation_enabled**\ (\ )
If ``true``, the body cannot rotate. Gravity and forces only apply linear movement.
@@ -696,8 +696,8 @@ If ``true``, the body cannot rotate. Gravity and forces only apply linear moveme
.. rst-class:: classref-property-setget
- void **set_mass** **(** :ref:`float<class_float>` value **)**
- :ref:`float<class_float>` **get_mass** **(** **)**
- |void| **set_mass**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_mass**\ (\ )
The body's mass.
@@ -713,8 +713,8 @@ The body's mass.
.. rst-class:: classref-property-setget
- void **set_max_contacts_reported** **(** :ref:`int<class_int>` value **)**
- :ref:`int<class_int>` **get_max_contacts_reported** **(** **)**
- |void| **set_max_contacts_reported**\ (\ value\: :ref:`int<class_int>`\ )
- :ref:`int<class_int>` **get_max_contacts_reported**\ (\ )
The maximum number of contacts that will be recorded. Requires a value greater than 0 and :ref:`contact_monitor<class_RigidBody3D_property_contact_monitor>` to be set to ``true`` to start to register contacts. Use :ref:`get_contact_count<class_RigidBody3D_method_get_contact_count>` to retrieve the count or :ref:`get_colliding_bodies<class_RigidBody3D_method_get_colliding_bodies>` to retrieve bodies that have been collided with.
@@ -732,8 +732,8 @@ The maximum number of contacts that will be recorded. Requires a value greater t
.. rst-class:: classref-property-setget
- void **set_physics_material_override** **(** :ref:`PhysicsMaterial<class_PhysicsMaterial>` value **)**
- :ref:`PhysicsMaterial<class_PhysicsMaterial>` **get_physics_material_override** **(** **)**
- |void| **set_physics_material_override**\ (\ value\: :ref:`PhysicsMaterial<class_PhysicsMaterial>`\ )
- :ref:`PhysicsMaterial<class_PhysicsMaterial>` **get_physics_material_override**\ (\ )
The physics material override for the body.
@@ -751,8 +751,8 @@ If a material is assigned to this property, it will be used instead of any other
.. rst-class:: classref-property-setget
- void **set_sleeping** **(** :ref:`bool<class_bool>` value **)**
- :ref:`bool<class_bool>` **is_sleeping** **(** **)**
- |void| **set_sleeping**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **is_sleeping**\ (\ )
If ``true``, the body will not move and will not calculate forces until woken up by another body through, for example, a collision, or by using the :ref:`apply_impulse<class_RigidBody3D_method_apply_impulse>` or :ref:`apply_force<class_RigidBody3D_method_apply_force>` methods.
@@ -769,7 +769,7 @@ Method Descriptions
.. rst-class:: classref-method
void **_integrate_forces** **(** :ref:`PhysicsDirectBodyState3D<class_PhysicsDirectBodyState3D>` state **)** |virtual|
|void| **_integrate_forces**\ (\ state\: :ref:`PhysicsDirectBodyState3D<class_PhysicsDirectBodyState3D>`\ ) |virtual|
Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default, it works in addition to the usual physics behavior, but the :ref:`custom_integrator<class_RigidBody3D_property_custom_integrator>` property allows you to disable the default behavior and do fully custom force integration for a body.
@@ -781,7 +781,7 @@ Called during physics processing, allowing you to read and safely modify the sim
.. rst-class:: classref-method
void **add_constant_central_force** **(** :ref:`Vector3<class_Vector3>` force **)**
|void| **add_constant_central_force**\ (\ force\: :ref:`Vector3<class_Vector3>`\ )
Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with ``constant_force = Vector3(0, 0, 0)``.
@@ -795,7 +795,7 @@ This is equivalent to using :ref:`add_constant_force<class_RigidBody3D_method_ad
.. rst-class:: classref-method
void **add_constant_force** **(** :ref:`Vector3<class_Vector3>` force, :ref:`Vector3<class_Vector3>` position=Vector3(0, 0, 0) **)**
|void| **add_constant_force**\ (\ force\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ )
Adds a constant positioned force to the body that keeps being applied over time until cleared with ``constant_force = Vector3(0, 0, 0)``.
@@ -809,7 +809,7 @@ Adds a constant positioned force to the body that keeps being applied over time
.. rst-class:: classref-method
void **add_constant_torque** **(** :ref:`Vector3<class_Vector3>` torque **)**
|void| **add_constant_torque**\ (\ torque\: :ref:`Vector3<class_Vector3>`\ )
Adds a constant rotational force without affecting position that keeps being applied over time until cleared with ``constant_torque = Vector3(0, 0, 0)``.
@@ -821,7 +821,7 @@ Adds a constant rotational force without affecting position that keeps being app
.. rst-class:: classref-method
void **apply_central_force** **(** :ref:`Vector3<class_Vector3>` force **)**
|void| **apply_central_force**\ (\ force\: :ref:`Vector3<class_Vector3>`\ )
Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update.
@@ -835,7 +835,7 @@ This is equivalent to using :ref:`apply_force<class_RigidBody3D_method_apply_for
.. rst-class:: classref-method
void **apply_central_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)**
|void| **apply_central_impulse**\ (\ impulse\: :ref:`Vector3<class_Vector3>`\ )
Applies a directional impulse without affecting rotation.
@@ -851,7 +851,7 @@ This is equivalent to using :ref:`apply_impulse<class_RigidBody3D_method_apply_i
.. rst-class:: classref-method
void **apply_force** **(** :ref:`Vector3<class_Vector3>` force, :ref:`Vector3<class_Vector3>` position=Vector3(0, 0, 0) **)**
|void| **apply_force**\ (\ force\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ )
Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update.
@@ -865,7 +865,7 @@ Applies a positioned force to the body. A force is time dependent and meant to b
.. rst-class:: classref-method
void **apply_impulse** **(** :ref:`Vector3<class_Vector3>` impulse, :ref:`Vector3<class_Vector3>` position=Vector3(0, 0, 0) **)**
|void| **apply_impulse**\ (\ impulse\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ )
Applies a positioned impulse to the body.
@@ -881,7 +881,7 @@ An impulse is time-independent! Applying an impulse every frame would result in
.. rst-class:: classref-method
void **apply_torque** **(** :ref:`Vector3<class_Vector3>` torque **)**
|void| **apply_torque**\ (\ torque\: :ref:`Vector3<class_Vector3>`\ )
Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update.
@@ -895,7 +895,7 @@ Applies a rotational force without affecting position. A force is time dependent
.. rst-class:: classref-method
void **apply_torque_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)**
|void| **apply_torque_impulse**\ (\ impulse\: :ref:`Vector3<class_Vector3>`\ )
Applies a rotational impulse to the body without affecting the position.
@@ -911,7 +911,7 @@ An impulse is time-independent! Applying an impulse every frame would result in
.. rst-class:: classref-method
:ref:`Node3D[]<class_Node3D>` **get_colliding_bodies** **(** **)** |const|
:ref:`Array<class_Array>`\[:ref:`Node3D<class_Node3D>`\] **get_colliding_bodies**\ (\ ) |const|
Returns a list of the bodies colliding with this one. Requires :ref:`contact_monitor<class_RigidBody3D_property_contact_monitor>` to be set to ``true`` and :ref:`max_contacts_reported<class_RigidBody3D_property_max_contacts_reported>` to be set high enough to detect all the collisions.
@@ -925,7 +925,7 @@ Returns a list of the bodies colliding with this one. Requires :ref:`contact_mon
.. rst-class:: classref-method
:ref:`int<class_int>` **get_contact_count** **(** **)** |const|
:ref:`int<class_int>` **get_contact_count**\ (\ ) |const|
Returns the number of contacts this body has with other bodies. By default, this returns 0 unless bodies are configured to monitor contacts (see :ref:`contact_monitor<class_RigidBody3D_property_contact_monitor>`).
@@ -939,7 +939,7 @@ Returns the number of contacts this body has with other bodies. By default, this
.. rst-class:: classref-method
:ref:`Basis<class_Basis>` **get_inverse_inertia_tensor** **(** **)** |const|
:ref:`Basis<class_Basis>` **get_inverse_inertia_tensor**\ (\ ) |const|
Returns the inverse inertia tensor basis. This is used to calculate the angular acceleration resulting from a torque applied to the **RigidBody3D**.
@@ -951,7 +951,7 @@ Returns the inverse inertia tensor basis. This is used to calculate the angular
.. rst-class:: classref-method
void **set_axis_velocity** **(** :ref:`Vector3<class_Vector3>` axis_velocity **)**
|void| **set_axis_velocity**\ (\ axis_velocity\: :ref:`Vector3<class_Vector3>`\ )
Sets an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior.
@@ -962,3 +962,4 @@ Sets an axis velocity. The velocity in the given vector axis will be set as the
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
.. |void| replace:: :abbr:`void (No return value.)`