classref: Sync with current master branch (7d9923b2e)

This commit is contained in:
Rémi Verschelde
2022-11-17 21:03:53 +01:00
parent c2d9bd8436
commit 34089af20f
256 changed files with 8630 additions and 715 deletions
+87 -107
View File
@@ -31,35 +31,35 @@ Tutorials
Properties
----------
+---------------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------------------------+
| :ref:`Vector3<class_Vector3>` | :ref:`angular_velocity<class_PhysicsDirectBodyState3D_property_angular_velocity>` | ``Vector3(0, 0, 0)`` |
+---------------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------------------------+
| :ref:`Vector3<class_Vector3>` | :ref:`center_of_mass<class_PhysicsDirectBodyState3D_property_center_of_mass>` | ``Vector3(0, 0, 0)`` |
+---------------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------------------------+
| :ref:`Vector3<class_Vector3>` | :ref:`center_of_mass_local<class_PhysicsDirectBodyState3D_property_center_of_mass_local>` | ``Vector3(0, 0, 0)`` |
+---------------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------------------------+
| :ref:`Vector3<class_Vector3>` | :ref:`inverse_inertia<class_PhysicsDirectBodyState3D_property_inverse_inertia>` | ``Vector3(0, 0, 0)`` |
+---------------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------------------------+
| :ref:`Basis<class_Basis>` | :ref:`inverse_inertia_tensor<class_PhysicsDirectBodyState3D_property_inverse_inertia_tensor>` | ``Basis(1, 0, 0, 0, 1, 0, 0, 0, 1)`` |
+---------------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------------------------+
| :ref:`float<class_float>` | :ref:`inverse_mass<class_PhysicsDirectBodyState3D_property_inverse_mass>` | ``0.0`` |
+---------------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------------------------+
| :ref:`Vector3<class_Vector3>` | :ref:`linear_velocity<class_PhysicsDirectBodyState3D_property_linear_velocity>` | ``Vector3(0, 0, 0)`` |
+---------------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------------------------+
| :ref:`Basis<class_Basis>` | :ref:`principal_inertia_axes<class_PhysicsDirectBodyState3D_property_principal_inertia_axes>` | ``Basis(1, 0, 0, 0, 1, 0, 0, 0, 1)`` |
+---------------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`sleeping<class_PhysicsDirectBodyState3D_property_sleeping>` | ``false`` |
+---------------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------------------------+
| :ref:`float<class_float>` | :ref:`step<class_PhysicsDirectBodyState3D_property_step>` | ``0.0`` |
+---------------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------------------------+
| :ref:`float<class_float>` | :ref:`total_angular_damp<class_PhysicsDirectBodyState3D_property_total_angular_damp>` | ``0.0`` |
+---------------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------------------------+
| :ref:`Vector3<class_Vector3>` | :ref:`total_gravity<class_PhysicsDirectBodyState3D_property_total_gravity>` | ``Vector3(0, 0, 0)`` |
+---------------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------------------------+
| :ref:`float<class_float>` | :ref:`total_linear_damp<class_PhysicsDirectBodyState3D_property_total_linear_damp>` | ``0.0`` |
+---------------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------------------------+
| :ref:`Transform3D<class_Transform3D>` | :ref:`transform<class_PhysicsDirectBodyState3D_property_transform>` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` |
+---------------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------------------------+
+---------------------------------------+-----------------------------------------------------------------------------------------------+
| :ref:`Vector3<class_Vector3>` | :ref:`angular_velocity<class_PhysicsDirectBodyState3D_property_angular_velocity>` |
+---------------------------------------+-----------------------------------------------------------------------------------------------+
| :ref:`Vector3<class_Vector3>` | :ref:`center_of_mass<class_PhysicsDirectBodyState3D_property_center_of_mass>` |
+---------------------------------------+-----------------------------------------------------------------------------------------------+
| :ref:`Vector3<class_Vector3>` | :ref:`center_of_mass_local<class_PhysicsDirectBodyState3D_property_center_of_mass_local>` |
+---------------------------------------+-----------------------------------------------------------------------------------------------+
| :ref:`Vector3<class_Vector3>` | :ref:`inverse_inertia<class_PhysicsDirectBodyState3D_property_inverse_inertia>` |
+---------------------------------------+-----------------------------------------------------------------------------------------------+
| :ref:`Basis<class_Basis>` | :ref:`inverse_inertia_tensor<class_PhysicsDirectBodyState3D_property_inverse_inertia_tensor>` |
+---------------------------------------+-----------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`inverse_mass<class_PhysicsDirectBodyState3D_property_inverse_mass>` |
+---------------------------------------+-----------------------------------------------------------------------------------------------+
| :ref:`Vector3<class_Vector3>` | :ref:`linear_velocity<class_PhysicsDirectBodyState3D_property_linear_velocity>` |
+---------------------------------------+-----------------------------------------------------------------------------------------------+
| :ref:`Basis<class_Basis>` | :ref:`principal_inertia_axes<class_PhysicsDirectBodyState3D_property_principal_inertia_axes>` |
+---------------------------------------+-----------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`sleeping<class_PhysicsDirectBodyState3D_property_sleeping>` |
+---------------------------------------+-----------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`step<class_PhysicsDirectBodyState3D_property_step>` |
+---------------------------------------+-----------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`total_angular_damp<class_PhysicsDirectBodyState3D_property_total_angular_damp>` |
+---------------------------------------+-----------------------------------------------------------------------------------------------+
| :ref:`Vector3<class_Vector3>` | :ref:`total_gravity<class_PhysicsDirectBodyState3D_property_total_gravity>` |
+---------------------------------------+-----------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`total_linear_damp<class_PhysicsDirectBodyState3D_property_total_linear_damp>` |
+---------------------------------------+-----------------------------------------------------------------------------------------------+
| :ref:`Transform3D<class_Transform3D>` | :ref:`transform<class_PhysicsDirectBodyState3D_property_transform>` |
+---------------------------------------+-----------------------------------------------------------------------------------------------+
Methods
-------
@@ -127,13 +127,11 @@ Property Descriptions
- :ref:`Vector3<class_Vector3>` **angular_velocity**
+-----------+-----------------------------+
| *Default* | ``Vector3(0, 0, 0)`` |
+-----------+-----------------------------+
| *Setter* | set_angular_velocity(value) |
+-----------+-----------------------------+
| *Getter* | get_angular_velocity() |
+-----------+-----------------------------+
+----------+-----------------------------+
| *Setter* | set_angular_velocity(value) |
+----------+-----------------------------+
| *Getter* | get_angular_velocity() |
+----------+-----------------------------+
The body's rotational velocity in *radians* per second.
@@ -143,11 +141,9 @@ The body's rotational velocity in *radians* per second.
- :ref:`Vector3<class_Vector3>` **center_of_mass**
+-----------+----------------------+
| *Default* | ``Vector3(0, 0, 0)`` |
+-----------+----------------------+
| *Getter* | get_center_of_mass() |
+-----------+----------------------+
+----------+----------------------+
| *Getter* | get_center_of_mass() |
+----------+----------------------+
The body's center of mass position relative to the body's center in the global coordinate system.
@@ -157,11 +153,9 @@ The body's center of mass position relative to the body's center in the global c
- :ref:`Vector3<class_Vector3>` **center_of_mass_local**
+-----------+----------------------------+
| *Default* | ``Vector3(0, 0, 0)`` |
+-----------+----------------------------+
| *Getter* | get_center_of_mass_local() |
+-----------+----------------------------+
+----------+----------------------------+
| *Getter* | get_center_of_mass_local() |
+----------+----------------------------+
The body's center of mass position in the body's local coordinate system.
@@ -171,11 +165,9 @@ The body's center of mass position in the body's local coordinate system.
- :ref:`Vector3<class_Vector3>` **inverse_inertia**
+-----------+-----------------------+
| *Default* | ``Vector3(0, 0, 0)`` |
+-----------+-----------------------+
| *Getter* | get_inverse_inertia() |
+-----------+-----------------------+
+----------+-----------------------+
| *Getter* | get_inverse_inertia() |
+----------+-----------------------+
The inverse of the inertia of the body.
@@ -185,11 +177,9 @@ The inverse of the inertia of the body.
- :ref:`Basis<class_Basis>` **inverse_inertia_tensor**
+-----------+--------------------------------------+
| *Default* | ``Basis(1, 0, 0, 0, 1, 0, 0, 0, 1)`` |
+-----------+--------------------------------------+
| *Getter* | get_inverse_inertia_tensor() |
+-----------+--------------------------------------+
+----------+------------------------------+
| *Getter* | get_inverse_inertia_tensor() |
+----------+------------------------------+
The inverse of the inertia tensor of the body.
@@ -199,11 +189,9 @@ The inverse of the inertia tensor of the body.
- :ref:`float<class_float>` **inverse_mass**
+-----------+--------------------+
| *Default* | ``0.0`` |
+-----------+--------------------+
| *Getter* | get_inverse_mass() |
+-----------+--------------------+
+----------+--------------------+
| *Getter* | get_inverse_mass() |
+----------+--------------------+
The inverse of the mass of the body.
@@ -213,13 +201,11 @@ The inverse of the mass of the body.
- :ref:`Vector3<class_Vector3>` **linear_velocity**
+-----------+----------------------------+
| *Default* | ``Vector3(0, 0, 0)`` |
+-----------+----------------------------+
| *Setter* | set_linear_velocity(value) |
+-----------+----------------------------+
| *Getter* | get_linear_velocity() |
+-----------+----------------------------+
+----------+----------------------------+
| *Setter* | set_linear_velocity(value) |
+----------+----------------------------+
| *Getter* | get_linear_velocity() |
+----------+----------------------------+
The body's linear velocity in units per second.
@@ -229,11 +215,13 @@ The body's linear velocity in units per second.
- :ref:`Basis<class_Basis>` **principal_inertia_axes**
+-----------+--------------------------------------+
| *Default* | ``Basis(1, 0, 0, 0, 1, 0, 0, 0, 1)`` |
+-----------+--------------------------------------+
| *Getter* | get_principal_inertia_axes() |
+-----------+--------------------------------------+
+----------+------------------------------+
| *Getter* | get_principal_inertia_axes() |
+----------+------------------------------+
.. container:: contribute
There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
----
@@ -241,13 +229,11 @@ The body's linear velocity in units per second.
- :ref:`bool<class_bool>` **sleeping**
+-----------+------------------------+
| *Default* | ``false`` |
+-----------+------------------------+
| *Setter* | set_sleep_state(value) |
+-----------+------------------------+
| *Getter* | is_sleeping() |
+-----------+------------------------+
+----------+------------------------+
| *Setter* | set_sleep_state(value) |
+----------+------------------------+
| *Getter* | is_sleeping() |
+----------+------------------------+
If ``true``, this body is currently sleeping (not active).
@@ -257,11 +243,9 @@ If ``true``, this body is currently sleeping (not active).
- :ref:`float<class_float>` **step**
+-----------+------------+
| *Default* | ``0.0`` |
+-----------+------------+
| *Getter* | get_step() |
+-----------+------------+
+----------+------------+
| *Getter* | get_step() |
+----------+------------+
The timestep (delta) used for the simulation.
@@ -271,11 +255,9 @@ The timestep (delta) used for the simulation.
- :ref:`float<class_float>` **total_angular_damp**
+-----------+--------------------------+
| *Default* | ``0.0`` |
+-----------+--------------------------+
| *Getter* | get_total_angular_damp() |
+-----------+--------------------------+
+----------+--------------------------+
| *Getter* | get_total_angular_damp() |
+----------+--------------------------+
The rate at which the body stops rotating, if there are not any other forces moving it.
@@ -285,11 +267,9 @@ The rate at which the body stops rotating, if there are not any other forces mov
- :ref:`Vector3<class_Vector3>` **total_gravity**
+-----------+----------------------+
| *Default* | ``Vector3(0, 0, 0)`` |
+-----------+----------------------+
| *Getter* | get_total_gravity() |
+-----------+----------------------+
+----------+---------------------+
| *Getter* | get_total_gravity() |
+----------+---------------------+
The total gravity vector being currently applied to this body.
@@ -299,11 +279,9 @@ The total gravity vector being currently applied to this body.
- :ref:`float<class_float>` **total_linear_damp**
+-----------+-------------------------+
| *Default* | ``0.0`` |
+-----------+-------------------------+
| *Getter* | get_total_linear_damp() |
+-----------+-------------------------+
+----------+-------------------------+
| *Getter* | get_total_linear_damp() |
+----------+-------------------------+
The rate at which the body stops moving, if there are not any other forces moving it.
@@ -313,13 +291,11 @@ The rate at which the body stops moving, if there are not any other forces movin
- :ref:`Transform3D<class_Transform3D>` **transform**
+-----------+-----------------------------------------------------+
| *Default* | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` |
+-----------+-----------------------------------------------------+
| *Setter* | set_transform(value) |
+-----------+-----------------------------------------------------+
| *Getter* | get_transform() |
+-----------+-----------------------------------------------------+
+----------+----------------------+
| *Setter* | set_transform(value) |
+----------+----------------------+
| *Getter* | get_transform() |
+----------+----------------------+
The body's transformation matrix.
@@ -404,6 +380,8 @@ An impulse is time-independent! Applying an impulse every frame would result in
Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update.
\ **Note:** :ref:`inverse_inertia<class_PhysicsDirectBodyState3D_property_inverse_inertia>` is required for this to work. To have :ref:`inverse_inertia<class_PhysicsDirectBodyState3D_property_inverse_inertia>`, an active :ref:`CollisionShape3D<class_CollisionShape3D>` must be a child of the node, or you can manually set :ref:`inverse_inertia<class_PhysicsDirectBodyState3D_property_inverse_inertia>`.
----
.. _class_PhysicsDirectBodyState3D_method_apply_torque_impulse:
@@ -414,6 +392,8 @@ Applies a rotational impulse to the body without affecting the position.
An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
\ **Note:** :ref:`inverse_inertia<class_PhysicsDirectBodyState3D_property_inverse_inertia>` is required for this to work. To have :ref:`inverse_inertia<class_PhysicsDirectBodyState3D_property_inverse_inertia>`, an active :ref:`CollisionShape3D<class_CollisionShape3D>` must be a child of the node, or you can manually set :ref:`inverse_inertia<class_PhysicsDirectBodyState3D_property_inverse_inertia>`.
----
.. _class_PhysicsDirectBodyState3D_method_get_constant_force: