mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2026-01-04 10:09:56 +03:00
789 lines
46 KiB
ReStructuredText
789 lines
46 KiB
ReStructuredText
:github_url: hide
|
||
|
||
.. _class_PhysicsDirectBodyState3D:
|
||
|
||
PhysicsDirectBodyState3D
|
||
========================
|
||
|
||
**Успадковує:** :ref:`Object<class_Object>`
|
||
|
||
**Успадковано від:** :ref:`PhysicsDirectBodyState3DExtension<class_PhysicsDirectBodyState3DExtension>`
|
||
|
||
Забезпечує прямий доступ до фізичного тіла в :ref:`PhysicsServer3D<class_PhysicsServer3D>`.
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
Опис
|
||
--------
|
||
|
||
Забезпечує прямий доступ до фізичного тіла в :ref:`PhysicsServer3D<class_PhysicsServer3D>`, що дозволяє безпечні зміни фізико-фізичних властивостей. Цей об'єкт пропускається через прямий державний зворотний зв'язок :ref:`RigidBody3D<class_RigidBody3D>`, і призначений для зміни безпосереднього стану цього тіла. :ref:`RigidBody3D._integrate_forces()<class_RigidBody3D_private_method__integrate_forces>`.
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
Посібники
|
||
------------------
|
||
|
||
- :doc:`Запровадження фізики <../tutorials/physics/physics_introduction>`
|
||
|
||
- :doc:`Рей-розміщення <../tutorials/physics/ray-casting>`
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
Властивості
|
||
----------------------
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+---------------------------------------+-----------------------------------------------------------------------------------------------+
|
||
| :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:`int<class_int>` | :ref:`collision_layer<class_PhysicsDirectBodyState3D_property_collision_layer>` |
|
||
+---------------------------------------+-----------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`collision_mask<class_PhysicsDirectBodyState3D_property_collision_mask>` |
|
||
+---------------------------------------+-----------------------------------------------------------------------------------------------+
|
||
| :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>` |
|
||
+---------------------------------------+-----------------------------------------------------------------------------------------------+
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
Методи
|
||
------------
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`add_constant_central_force<class_PhysicsDirectBodyState3D_method_add_constant_central_force>`\ (\ force\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) |
|
||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`add_constant_force<class_PhysicsDirectBodyState3D_method_add_constant_force>`\ (\ force\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) |
|
||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`add_constant_torque<class_PhysicsDirectBodyState3D_method_add_constant_torque>`\ (\ torque\: :ref:`Vector3<class_Vector3>`\ ) |
|
||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`apply_central_force<class_PhysicsDirectBodyState3D_method_apply_central_force>`\ (\ force\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) |
|
||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`apply_central_impulse<class_PhysicsDirectBodyState3D_method_apply_central_impulse>`\ (\ impulse\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) |
|
||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`apply_force<class_PhysicsDirectBodyState3D_method_apply_force>`\ (\ force\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) |
|
||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`apply_impulse<class_PhysicsDirectBodyState3D_method_apply_impulse>`\ (\ impulse\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) |
|
||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`apply_torque<class_PhysicsDirectBodyState3D_method_apply_torque>`\ (\ torque\: :ref:`Vector3<class_Vector3>`\ ) |
|
||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`apply_torque_impulse<class_PhysicsDirectBodyState3D_method_apply_torque_impulse>`\ (\ impulse\: :ref:`Vector3<class_Vector3>`\ ) |
|
||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Vector3<class_Vector3>` | :ref:`get_constant_force<class_PhysicsDirectBodyState3D_method_get_constant_force>`\ (\ ) |const| |
|
||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Vector3<class_Vector3>` | :ref:`get_constant_torque<class_PhysicsDirectBodyState3D_method_get_constant_torque>`\ (\ ) |const| |
|
||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`RID<class_RID>` | :ref:`get_contact_collider<class_PhysicsDirectBodyState3D_method_get_contact_collider>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`get_contact_collider_id<class_PhysicsDirectBodyState3D_method_get_contact_collider_id>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Object<class_Object>` | :ref:`get_contact_collider_object<class_PhysicsDirectBodyState3D_method_get_contact_collider_object>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Vector3<class_Vector3>` | :ref:`get_contact_collider_position<class_PhysicsDirectBodyState3D_method_get_contact_collider_position>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`get_contact_collider_shape<class_PhysicsDirectBodyState3D_method_get_contact_collider_shape>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Vector3<class_Vector3>` | :ref:`get_contact_collider_velocity_at_position<class_PhysicsDirectBodyState3D_method_get_contact_collider_velocity_at_position>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`get_contact_count<class_PhysicsDirectBodyState3D_method_get_contact_count>`\ (\ ) |const| |
|
||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Vector3<class_Vector3>` | :ref:`get_contact_impulse<class_PhysicsDirectBodyState3D_method_get_contact_impulse>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Vector3<class_Vector3>` | :ref:`get_contact_local_normal<class_PhysicsDirectBodyState3D_method_get_contact_local_normal>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Vector3<class_Vector3>` | :ref:`get_contact_local_position<class_PhysicsDirectBodyState3D_method_get_contact_local_position>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`get_contact_local_shape<class_PhysicsDirectBodyState3D_method_get_contact_local_shape>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Vector3<class_Vector3>` | :ref:`get_contact_local_velocity_at_position<class_PhysicsDirectBodyState3D_method_get_contact_local_velocity_at_position>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| |
|
||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`PhysicsDirectSpaceState3D<class_PhysicsDirectSpaceState3D>` | :ref:`get_space_state<class_PhysicsDirectBodyState3D_method_get_space_state>`\ (\ ) |
|
||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Vector3<class_Vector3>` | :ref:`get_velocity_at_local_position<class_PhysicsDirectBodyState3D_method_get_velocity_at_local_position>`\ (\ local_position\: :ref:`Vector3<class_Vector3>`\ ) |const| |
|
||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`integrate_forces<class_PhysicsDirectBodyState3D_method_integrate_forces>`\ (\ ) |
|
||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_constant_force<class_PhysicsDirectBodyState3D_method_set_constant_force>`\ (\ force\: :ref:`Vector3<class_Vector3>`\ ) |
|
||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_constant_torque<class_PhysicsDirectBodyState3D_method_set_constant_torque>`\ (\ torque\: :ref:`Vector3<class_Vector3>`\ ) |
|
||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Описи властивостей
|
||
------------------------------------
|
||
|
||
.. _class_PhysicsDirectBodyState3D_property_angular_velocity:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`Vector3<class_Vector3>` **angular_velocity** :ref:`🔗<class_PhysicsDirectBodyState3D_property_angular_velocity>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_angular_velocity**\ (\ value\: :ref:`Vector3<class_Vector3>`\ )
|
||
- :ref:`Vector3<class_Vector3>` **get_angular_velocity**\ (\ )
|
||
|
||
Швидкість обертання тіла в *radians* за секунду.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PhysicsDirectBodyState3D_property_center_of_mass:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`Vector3<class_Vector3>` **center_of_mass** :ref:`🔗<class_PhysicsDirectBodyState3D_property_center_of_mass>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- :ref:`Vector3<class_Vector3>` **get_center_of_mass**\ (\ )
|
||
|
||
Центр маси тіла відносно центру тіла у глобальній координатній системі.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PhysicsDirectBodyState3D_property_center_of_mass_local:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`Vector3<class_Vector3>` **center_of_mass_local** :ref:`🔗<class_PhysicsDirectBodyState3D_property_center_of_mass_local>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- :ref:`Vector3<class_Vector3>` **get_center_of_mass_local**\ (\ )
|
||
|
||
Центр маси тіла в локальній координатній системі тіла.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PhysicsDirectBodyState3D_property_collision_layer:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`int<class_int>` **collision_layer** :ref:`🔗<class_PhysicsDirectBodyState3D_property_collision_layer>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_collision_layer**\ (\ value\: :ref:`int<class_int>`\ )
|
||
- :ref:`int<class_int>` **get_collision_layer**\ (\ )
|
||
|
||
Шар зіткнення тіла.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PhysicsDirectBodyState3D_property_collision_mask:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`int<class_int>` **collision_mask** :ref:`🔗<class_PhysicsDirectBodyState3D_property_collision_mask>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_collision_mask**\ (\ value\: :ref:`int<class_int>`\ )
|
||
- :ref:`int<class_int>` **get_collision_mask**\ (\ )
|
||
|
||
Маска зіткнення тіла.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PhysicsDirectBodyState3D_property_inverse_inertia:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`Vector3<class_Vector3>` **inverse_inertia** :ref:`🔗<class_PhysicsDirectBodyState3D_property_inverse_inertia>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- :ref:`Vector3<class_Vector3>` **get_inverse_inertia**\ (\ )
|
||
|
||
Інверс інерції тіла.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PhysicsDirectBodyState3D_property_inverse_inertia_tensor:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`Basis<class_Basis>` **inverse_inertia_tensor** :ref:`🔗<class_PhysicsDirectBodyState3D_property_inverse_inertia_tensor>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- :ref:`Basis<class_Basis>` **get_inverse_inertia_tensor**\ (\ )
|
||
|
||
Інверс інерції тензора тіла.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PhysicsDirectBodyState3D_property_inverse_mass:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **inverse_mass** :ref:`🔗<class_PhysicsDirectBodyState3D_property_inverse_mass>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- :ref:`float<class_float>` **get_inverse_mass**\ (\ )
|
||
|
||
Інверс маси тіла.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PhysicsDirectBodyState3D_property_linear_velocity:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`Vector3<class_Vector3>` **linear_velocity** :ref:`🔗<class_PhysicsDirectBodyState3D_property_linear_velocity>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_linear_velocity**\ (\ value\: :ref:`Vector3<class_Vector3>`\ )
|
||
- :ref:`Vector3<class_Vector3>` **get_linear_velocity**\ (\ )
|
||
|
||
Лінійна швидкість тіла в блоках на секунду.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PhysicsDirectBodyState3D_property_principal_inertia_axes:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`Basis<class_Basis>` **principal_inertia_axes** :ref:`🔗<class_PhysicsDirectBodyState3D_property_principal_inertia_axes>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- :ref:`Basis<class_Basis>` **get_principal_inertia_axes**\ (\ )
|
||
|
||
.. container:: contribute
|
||
|
||
There is currently no description for this property. Please help us by `contributing one <https://contributing.godotengine.org/en/latest/documentation/class_reference.html>`__!
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PhysicsDirectBodyState3D_property_sleeping:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **sleeping** :ref:`🔗<class_PhysicsDirectBodyState3D_property_sleeping>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_sleep_state**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **is_sleeping**\ (\ )
|
||
|
||
Якщо ``true``, це тіло зараз спить (не активний).
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PhysicsDirectBodyState3D_property_step:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **step** :ref:`🔗<class_PhysicsDirectBodyState3D_property_step>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- :ref:`float<class_float>` **get_step**\ (\ )
|
||
|
||
Часовий (delta) використовується для моделювання.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PhysicsDirectBodyState3D_property_total_angular_damp:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **total_angular_damp** :ref:`🔗<class_PhysicsDirectBodyState3D_property_total_angular_damp>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- :ref:`float<class_float>` **get_total_angular_damp**\ (\ )
|
||
|
||
Швидкість, при якій тіло припиняє обертати, якщо інші сили не рухаються.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PhysicsDirectBodyState3D_property_total_gravity:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`Vector3<class_Vector3>` **total_gravity** :ref:`🔗<class_PhysicsDirectBodyState3D_property_total_gravity>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- :ref:`Vector3<class_Vector3>` **get_total_gravity**\ (\ )
|
||
|
||
Вектор загальної ваги в даний час застосовується до цього тіла.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PhysicsDirectBodyState3D_property_total_linear_damp:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **total_linear_damp** :ref:`🔗<class_PhysicsDirectBodyState3D_property_total_linear_damp>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- :ref:`float<class_float>` **get_total_linear_damp**\ (\ )
|
||
|
||
Швидкість, при якій тіло припиняє рух, якщо інші сили не рухаються.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PhysicsDirectBodyState3D_property_transform:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`Transform3D<class_Transform3D>` **transform** :ref:`🔗<class_PhysicsDirectBodyState3D_property_transform>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_transform**\ (\ value\: :ref:`Transform3D<class_Transform3D>`\ )
|
||
- :ref:`Transform3D<class_Transform3D>` **get_transform**\ (\ )
|
||
|
||
Матриця трансформації тіла.
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Описи методів
|
||
--------------------------
|
||
|
||
.. _class_PhysicsDirectBodyState3D_method_add_constant_central_force:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **add_constant_central_force**\ (\ force\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) :ref:`🔗<class_PhysicsDirectBodyState3D_method_add_constant_central_force>`
|
||
|
||
Додавання постійної спрямованої сили без ударної обертання, яка зберігає час, поки не очищається ``constant_force = Vector3(0, 0)``.
|
||
|
||
Це еквівалентно використанню :ref:`add_constant_force()<class_PhysicsDirectBodyState3D_method_add_constant_force>` в центрі маси тіла.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PhysicsDirectBodyState3D_method_add_constant_force:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **add_constant_force**\ (\ force\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) :ref:`🔗<class_PhysicsDirectBodyState3D_method_add_constant_force>`
|
||
|
||
Додавання постійної позиціонованої сили до тіла, яка зберігає час, поки не очищається ``constant_force = Vector2(0, 0)``.
|
||
|
||
\ ``position`` – це зміщення з організму в глобальних координатах.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PhysicsDirectBodyState3D_method_add_constant_torque:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **add_constant_torque**\ (\ torque\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_PhysicsDirectBodyState3D_method_add_constant_torque>`
|
||
|
||
Додавання постійної обертальної сили без впливу положення, яка зберігає час, поки не очищається ``constant_torque = Vector3(0, 0)``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PhysicsDirectBodyState3D_method_apply_central_force:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **apply_central_force**\ (\ force\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) :ref:`🔗<class_PhysicsDirectBodyState3D_method_apply_central_force>`
|
||
|
||
Застосовується спрямована сила без ударного обертання. Знаряддя часу залежна і означена для кожного оновлення фізики.
|
||
|
||
Це еквівалентно використання :ref:`apply_force()<class_PhysicsDirectBodyState3D_method_apply_force>` в центрі маси тіла.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PhysicsDirectBodyState3D_method_apply_central_impulse:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **apply_central_impulse**\ (\ impulse\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) :ref:`🔗<class_PhysicsDirectBodyState3D_method_apply_central_impulse>`
|
||
|
||
Застосовується спрямований імпульс без впливу обертання.
|
||
|
||
Імпульс часозалежний! Нанесення імпульсу кожного кадру призведе до каркасно-залежної сили. З цієї причини слід використовувати тільки при симуляції одноразових ударів (користування функції "_сил" інакше).
|
||
|
||
Це еквівалентно використання :ref:`apply_impulse()<class_PhysicsDirectBodyState3D_method_apply_impulse>` в центрі маси тіла.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PhysicsDirectBodyState3D_method_apply_force:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **apply_force**\ (\ force\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) :ref:`🔗<class_PhysicsDirectBodyState3D_method_apply_force>`
|
||
|
||
Застосовується сила позиціонування організму. Знаряддя часу залежна і означена для кожного оновлення фізики.
|
||
|
||
\ ``position`` – це зміщення з організму в глобальних координатах.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PhysicsDirectBodyState3D_method_apply_impulse:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **apply_impulse**\ (\ impulse\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) :ref:`🔗<class_PhysicsDirectBodyState3D_method_apply_impulse>`
|
||
|
||
Застосує поміщений імпульс до тіла.
|
||
|
||
Імпульс часозалежний! Нанесення імпульсу кожного кадру призведе до каркасно-залежної сили. З цієї причини слід використовувати тільки при симуляції одноразових ударів (користування функції "_сил" інакше).
|
||
|
||
\ ``position`` – це зміщення з організму в глобальних координатах.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PhysicsDirectBodyState3D_method_apply_torque:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **apply_torque**\ (\ torque\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_PhysicsDirectBodyState3D_method_apply_torque>`
|
||
|
||
Застосовується обертальна сила, не впливає на положення. Знаряддя часу залежна і означена для кожного оновлення фізики.
|
||
|
||
\ **Примітка:** :ref:`inverse_inertia<class_PhysicsDirectBodyState3D_property_inverse_inertia>` обов'язковий для цього для роботи. Для того, щоб мати :ref:`inverse_inertia<class_PhysicsDirectBodyState3D_property_inverse_inertia>`, активний :ref:`CollisionShape3D<class_CollisionShape3D>` повинен бути дитиною вузла, або ви можете вручну встановити :ref:`inverse_inertia<class_PhysicsDirectBodyState3D_property_inverse_inertia>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PhysicsDirectBodyState3D_method_apply_torque_impulse:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **apply_torque_impulse**\ (\ impulse\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_PhysicsDirectBodyState3D_method_apply_torque_impulse>`
|
||
|
||
Застосовує обертальний імпульс до тіла без впливу на положення.
|
||
|
||
Імпульс часозалежний! Нанесення імпульсу кожного кадру призведе до каркасно-залежної сили. З цієї причини слід використовувати тільки при симуляції одноразових ударів (користування функції "_сил" інакше).
|
||
|
||
\ **Примітка:** :ref:`inverse_inertia<class_PhysicsDirectBodyState3D_property_inverse_inertia>` обов'язково для роботи. Для того, щоб мати :ref:`inverse_inertia<class_PhysicsDirectBodyState3D_property_inverse_inertia>`, активний :ref:`CollisionShape3D<class_CollisionShape3D>` повинен бути дитиною вузла, або ви можете вручну встановити :ref:`inverse_inertia<class_PhysicsDirectBodyState3D_property_inverse_inertia>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PhysicsDirectBodyState3D_method_get_constant_force:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Vector3<class_Vector3>` **get_constant_force**\ (\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState3D_method_get_constant_force>`
|
||
|
||
Під час кожного оновлення фізики повертається загальний стан сил тіла.
|
||
|
||
Див. :ref:`add_constant_force()<class_PhysicsDirectBodyState3D_method_add_constant_force>` і :ref:`add_constant_central_force()<class_PhysicsDirectBodyState3D_method_add_constant_central_force>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PhysicsDirectBodyState3D_method_get_constant_torque:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Vector3<class_Vector3>` **get_constant_torque**\ (\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState3D_method_get_constant_torque>`
|
||
|
||
Під час кожного оновлення фізики повернулися загальні постійні обертальні сили.
|
||
|
||
Див. :ref:`add_constant_torque()<class_PhysicsDirectBodyState3D_method_add_constant_torque>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PhysicsDirectBodyState3D_method_get_contact_collider:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`RID<class_RID>` **get_contact_collider**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState3D_method_get_contact_collider>`
|
||
|
||
Повертає увагу :ref:`RID<class_RID>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PhysicsDirectBodyState3D_method_get_contact_collider_id:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **get_contact_collider_id**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState3D_method_get_contact_collider_id>`
|
||
|
||
Повернення об'єкта Collider id.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PhysicsDirectBodyState3D_method_get_contact_collider_object:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Object<class_Object>` **get_contact_collider_object**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState3D_method_get_contact_collider_object>`
|
||
|
||
Повертає об'єкт Collider.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PhysicsDirectBodyState3D_method_get_contact_collider_position:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Vector3<class_Vector3>` **get_contact_collider_position**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState3D_method_get_contact_collider_position>`
|
||
|
||
Повертає позицію контактної точки на Collider у глобальній координатній системі.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PhysicsDirectBodyState3D_method_get_contact_collider_shape:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **get_contact_collider_shape**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState3D_method_get_contact_collider_shape>`
|
||
|
||
Повертає індекс форми Collider.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PhysicsDirectBodyState3D_method_get_contact_collider_velocity_at_position:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Vector3<class_Vector3>` **get_contact_collider_velocity_at_position**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState3D_method_get_contact_collider_velocity_at_position>`
|
||
|
||
Повертає вектор лінійної швидкості на контактній точці комірця.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PhysicsDirectBodyState3D_method_get_contact_count:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **get_contact_count**\ (\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState3D_method_get_contact_count>`
|
||
|
||
Повертає кількість контактів, що це тіло має інші тіла.
|
||
|
||
\ **Примітка:** За замовчуванням, це повертає 0, якщо органи налаштовані для моніторингу контактів. Див. :ref:`RigidBody3D.contact_monitor<class_RigidBody3D_property_contact_monitor>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PhysicsDirectBodyState3D_method_get_contact_impulse:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Vector3<class_Vector3>` **get_contact_impulse**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState3D_method_get_contact_impulse>`
|
||
|
||
Імпульс, створений контактом.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PhysicsDirectBodyState3D_method_get_contact_local_normal:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Vector3<class_Vector3>` **get_contact_local_normal**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState3D_method_get_contact_local_normal>`
|
||
|
||
Повертає локальний нормаль в контактній точці.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PhysicsDirectBodyState3D_method_get_contact_local_position:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Vector3<class_Vector3>` **get_contact_local_position**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState3D_method_get_contact_local_position>`
|
||
|
||
Повертає позицію точки контакту на тілі у глобальній координаційній системі.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PhysicsDirectBodyState3D_method_get_contact_local_shape:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **get_contact_local_shape**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState3D_method_get_contact_local_shape>`
|
||
|
||
Повертає індекс локальної форми зіткнення.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PhysicsDirectBodyState3D_method_get_contact_local_velocity_at_position:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Vector3<class_Vector3>` **get_contact_local_velocity_at_position**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState3D_method_get_contact_local_velocity_at_position>`
|
||
|
||
Повертає вектор лінійної швидкості на контактній точці тіла.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PhysicsDirectBodyState3D_method_get_space_state:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`PhysicsDirectSpaceState3D<class_PhysicsDirectSpaceState3D>` **get_space_state**\ (\ ) :ref:`🔗<class_PhysicsDirectBodyState3D_method_get_space_state>`
|
||
|
||
Повертає поточний стан простору, корисний для запитів.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PhysicsDirectBodyState3D_method_get_velocity_at_local_position:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Vector3<class_Vector3>` **get_velocity_at_local_position**\ (\ local_position\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState3D_method_get_velocity_at_local_position>`
|
||
|
||
Повертаємо швидкість тіла при даній відносній позиції, включаючи як переклад, так і обертання.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PhysicsDirectBodyState3D_method_integrate_forces:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **integrate_forces**\ (\ ) :ref:`🔗<class_PhysicsDirectBodyState3D_method_integrate_forces>`
|
||
|
||
Оновлює лінійну і кутову швидкість тіла, застосовуючи тяжіння і знешкодження для еквівалента однієї фізичної клітки.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PhysicsDirectBodyState3D_method_set_constant_force:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_constant_force**\ (\ force\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_PhysicsDirectBodyState3D_method_set_constant_force>`
|
||
|
||
Під час кожного оновлення фізики налаштовується загальна констанційна сила тіла.
|
||
|
||
Див. :ref:`add_constant_force()<class_PhysicsDirectBodyState3D_method_add_constant_force>` і :ref:`add_constant_central_force()<class_PhysicsDirectBodyState3D_method_add_constant_central_force>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_PhysicsDirectBodyState3D_method_set_constant_torque:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_constant_torque**\ (\ torque\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_PhysicsDirectBodyState3D_method_set_constant_torque>`
|
||
|
||
Встановлює загальні постійні обертальні сили організму, що застосовуються під час кожного оновлення фізики.
|
||
|
||
Див. :ref:`add_constant_torque()<class_PhysicsDirectBodyState3D_method_add_constant_torque>`.
|
||
|
||
.. |virtual| replace:: :abbr:`virtual (Зазвичай, цей метод перевизначається користувачем, щоб він мав вплив.)`
|
||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||
.. |const| replace:: :abbr:`const (Цей метод не має побічних ефектів. Не змінює ніяку змінну екземпляра об'єкта.)`
|
||
.. |vararg| replace:: :abbr:`vararg (Цей метод приймає будь-яке число аргументів після описаних тут.)`
|
||
.. |constructor| replace:: :abbr:`constructor (Цей метод використовується для побудови типів.)`
|
||
.. |static| replace:: :abbr:`static (Цей метод не потребує екземпляра для виклику, його можна викликати безпосередньо за допомогою назви класу.)`
|
||
.. |operator| replace:: :abbr:`operator (Цей метод описує дійсний оператор для взаємодії з цим типом як з лівим операндом.)`
|
||
.. |bitfield| replace:: :abbr:`BitField (Це значення є цілим числом, складеним у вигляді бітової маски з наступних прапорів.)`
|
||
.. |void| replace:: :abbr:`void (Значення не повертається.)`
|