mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2025-12-31 09:49:22 +03:00
552 lines
36 KiB
ReStructuredText
552 lines
36 KiB
ReStructuredText
:github_url: hide
|
||
|
||
.. _class_SoftBody3D:
|
||
|
||
SoftBody3D
|
||
==========
|
||
|
||
**Наследует:** :ref:`MeshInstance3D<class_MeshInstance3D>` **<** :ref:`GeometryInstance3D<class_GeometryInstance3D>` **<** :ref:`VisualInstance3D<class_VisualInstance3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||
|
||
Деформируемая 3D физическая сетка.
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
Описание
|
||
----------------
|
||
|
||
Деформируемая 3D-физическая сетка. Используется для создания эластичных или деформируемых объектов, таких как ткань, резина или другие гибкие материалы.
|
||
|
||
Кроме того, **SoftBody3D** подвержен влиянию сил ветра, определенных в :ref:`Area3D<class_Area3D>` (см. :ref:`Area3D.wind_source_path<class_Area3D_property_wind_source_path>`, :ref:`Area3D.wind_force_magnitude<class_Area3D_property_wind_force_magnitude>` и :ref:`Area3D.wind_attenuation_factor<class_Area3D_property_wind_attenuation_factor>`).
|
||
|
||
\ **Примечание:** Рекомендуется использовать Jolt Physics при использовании **SoftBody3D** вместо GodotPhysics3D по умолчанию, так как реализация мягкого тела Jolt Physics быстрее и надежнее. Вы можете переключить физический движок с помощью настройки проекта :ref:`ProjectSettings.physics/3d/physics_engine<class_ProjectSettings_property_physics/3d/physics_engine>`.
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
Обучающие материалы
|
||
--------------------------------------
|
||
|
||
- :doc:`SoftBody <../tutorials/physics/soft_body>`
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
Свойства
|
||
----------------
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+
|
||
| :ref:`int<class_int>` | :ref:`collision_layer<class_SoftBody3D_property_collision_layer>` | ``1`` |
|
||
+-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+
|
||
| :ref:`int<class_int>` | :ref:`collision_mask<class_SoftBody3D_property_collision_mask>` | ``1`` |
|
||
+-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+
|
||
| :ref:`float<class_float>` | :ref:`damping_coefficient<class_SoftBody3D_property_damping_coefficient>` | ``0.01`` |
|
||
+-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+
|
||
| :ref:`DisableMode<enum_SoftBody3D_DisableMode>` | :ref:`disable_mode<class_SoftBody3D_property_disable_mode>` | ``0`` |
|
||
+-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+
|
||
| :ref:`float<class_float>` | :ref:`drag_coefficient<class_SoftBody3D_property_drag_coefficient>` | ``0.0`` |
|
||
+-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+
|
||
| :ref:`float<class_float>` | :ref:`linear_stiffness<class_SoftBody3D_property_linear_stiffness>` | ``0.5`` |
|
||
+-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+
|
||
| :ref:`NodePath<class_NodePath>` | :ref:`parent_collision_ignore<class_SoftBody3D_property_parent_collision_ignore>` | ``NodePath("")`` |
|
||
+-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+
|
||
| :ref:`float<class_float>` | :ref:`pressure_coefficient<class_SoftBody3D_property_pressure_coefficient>` | ``0.0`` |
|
||
+-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`ray_pickable<class_SoftBody3D_property_ray_pickable>` | ``true`` |
|
||
+-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+
|
||
| :ref:`float<class_float>` | :ref:`shrinking_factor<class_SoftBody3D_property_shrinking_factor>` | ``0.0`` |
|
||
+-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+
|
||
| :ref:`int<class_int>` | :ref:`simulation_precision<class_SoftBody3D_property_simulation_precision>` | ``5`` |
|
||
+-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+
|
||
| :ref:`float<class_float>` | :ref:`total_mass<class_SoftBody3D_property_total_mass>` | ``1.0`` |
|
||
+-------------------------------------------------+-----------------------------------------------------------------------------------+------------------+
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
Методы
|
||
------------
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`add_collision_exception_with<class_SoftBody3D_method_add_collision_exception_with>`\ (\ body\: :ref:`Node<class_Node>`\ ) |
|
||
+------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`apply_central_force<class_SoftBody3D_method_apply_central_force>`\ (\ force\: :ref:`Vector3<class_Vector3>`\ ) |
|
||
+------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`apply_central_impulse<class_SoftBody3D_method_apply_central_impulse>`\ (\ impulse\: :ref:`Vector3<class_Vector3>`\ ) |
|
||
+------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`apply_force<class_SoftBody3D_method_apply_force>`\ (\ point_index\: :ref:`int<class_int>`, force\: :ref:`Vector3<class_Vector3>`\ ) |
|
||
+------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`apply_impulse<class_SoftBody3D_method_apply_impulse>`\ (\ point_index\: :ref:`int<class_int>`, impulse\: :ref:`Vector3<class_Vector3>`\ ) |
|
||
+------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Array<class_Array>`\[:ref:`PhysicsBody3D<class_PhysicsBody3D>`\] | :ref:`get_collision_exceptions<class_SoftBody3D_method_get_collision_exceptions>`\ (\ ) |
|
||
+------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`get_collision_layer_value<class_SoftBody3D_method_get_collision_layer_value>`\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`get_collision_mask_value<class_SoftBody3D_method_get_collision_mask_value>`\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`RID<class_RID>` | :ref:`get_physics_rid<class_SoftBody3D_method_get_physics_rid>`\ (\ ) |const| |
|
||
+------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Vector3<class_Vector3>` | :ref:`get_point_transform<class_SoftBody3D_method_get_point_transform>`\ (\ point_index\: :ref:`int<class_int>`\ ) |
|
||
+------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`is_point_pinned<class_SoftBody3D_method_is_point_pinned>`\ (\ point_index\: :ref:`int<class_int>`\ ) |const| |
|
||
+------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`remove_collision_exception_with<class_SoftBody3D_method_remove_collision_exception_with>`\ (\ body\: :ref:`Node<class_Node>`\ ) |
|
||
+------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_collision_layer_value<class_SoftBody3D_method_set_collision_layer_value>`\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) |
|
||
+------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_collision_mask_value<class_SoftBody3D_method_set_collision_mask_value>`\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) |
|
||
+------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_point_pinned<class_SoftBody3D_method_set_point_pinned>`\ (\ point_index\: :ref:`int<class_int>`, pinned\: :ref:`bool<class_bool>`, attachment_path\: :ref:`NodePath<class_NodePath>` = NodePath(""), insert_at\: :ref:`int<class_int>` = -1\ ) |
|
||
+------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Перечисления
|
||
------------------------
|
||
|
||
.. _enum_SoftBody3D_DisableMode:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **DisableMode**: :ref:`🔗<enum_SoftBody3D_DisableMode>`
|
||
|
||
.. _class_SoftBody3D_constant_DISABLE_MODE_REMOVE:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`DisableMode<enum_SoftBody3D_DisableMode>` **DISABLE_MODE_REMOVE** = ``0``
|
||
|
||
Когда :ref:`Node.process_mode<class_Node_property_process_mode>` установлен в :ref:`Node.PROCESS_MODE_DISABLED<class_Node_constant_PROCESS_MODE_DISABLED>`, объект **SoftBody3D** удаляется из физического моделирования, чтобы остановить все физические взаимодействия с ним.
|
||
|
||
Автоматически добавляется обратно в физическое моделирование, когда :ref:`Node<class_Node>` обрабатывается снова.
|
||
|
||
.. _class_SoftBody3D_constant_DISABLE_MODE_KEEP_ACTIVE:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`DisableMode<enum_SoftBody3D_DisableMode>` **DISABLE_MODE_KEEP_ACTIVE** = ``1``
|
||
|
||
Если :ref:`Node.process_mode<class_Node_property_process_mode>` установлен в :ref:`Node.PROCESS_MODE_DISABLED<class_Node_constant_PROCESS_MODE_DISABLED>`, это не влияет на физическую симуляцию.
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Описания свойств
|
||
--------------------------------
|
||
|
||
.. _class_SoftBody3D_property_collision_layer:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`int<class_int>` **collision_layer** = ``1`` :ref:`🔗<class_SoftBody3D_property_collision_layer>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_collision_layer**\ (\ value\: :ref:`int<class_int>`\ )
|
||
- :ref:`int<class_int>` **get_collision_layer**\ (\ )
|
||
|
||
Физические слои этого SoftBody3D\ **is in** (находится в). Коллизионные объекты могут существовать в одном или нескольких из 32 различных слоев. См. также :ref:`collision_mask<class_SoftBody3D_property_collision_mask>`.
|
||
|
||
\ **Примечание:** Объект A может обнаружить контакт с объектом B только в том случае, если объект B находится в любом из слоев, которые сканирует объект A. Дополнительную информацию см. в разделе `Слои и маски столкновений. <../tutorials/physics/physics_introduction.html#collision-layers-and-masks>`__ в документации.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_SoftBody3D_property_collision_mask:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`int<class_int>` **collision_mask** = ``1`` :ref:`🔗<class_SoftBody3D_property_collision_mask>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_collision_mask**\ (\ value\: :ref:`int<class_int>`\ )
|
||
- :ref:`int<class_int>` **get_collision_mask**\ (\ )
|
||
|
||
Физические слои этого SoftBody3D **scans**. Коллизионные объекты могут сканировать один или несколько из 32 различных слоев. Смотрите также :ref:`collision_layer<class_SoftBody3D_property_collision_layer>`.
|
||
|
||
\ **Примечание:** Объект A может обнаружить контакт с объектом B только если объект B находится в любом из слоев, которые сканирует объект A. Дополнительную информацию можно посмотреть в документации, перейдя по ссылке `Collision layers and masks <../tutorials/physics/physics_introduction.html#collision-layers-and-masks>`__.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_SoftBody3D_property_damping_coefficient:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **damping_coefficient** = ``0.01`` :ref:`🔗<class_SoftBody3D_property_damping_coefficient>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_damping_coefficient**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_damping_coefficient**\ (\ )
|
||
|
||
Коэффициент демпфирования тела. Более высокие значения будут более заметно замедлять тело при приложении сил.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_SoftBody3D_property_disable_mode:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`DisableMode<enum_SoftBody3D_DisableMode>` **disable_mode** = ``0`` :ref:`🔗<class_SoftBody3D_property_disable_mode>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_disable_mode**\ (\ value\: :ref:`DisableMode<enum_SoftBody3D_DisableMode>`\ )
|
||
- :ref:`DisableMode<enum_SoftBody3D_DisableMode>` **get_disable_mode**\ (\ )
|
||
|
||
Определяет поведение в физике, когда :ref:`Node.process_mode<class_Node_property_process_mode>` установлен в :ref:`Node.PROCESS_MODE_DISABLED<class_Node_constant_PROCESS_MODE_DISABLED>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_SoftBody3D_property_drag_coefficient:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **drag_coefficient** = ``0.0`` :ref:`🔗<class_SoftBody3D_property_drag_coefficient>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_drag_coefficient**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_drag_coefficient**\ (\ )
|
||
|
||
Коэффициент сопротивления тела. Более высокие значения увеличивают сопротивление воздуха этого тела.
|
||
|
||
\ **Примечание:** Это значение в настоящее время не используется реализацией физики Godot по умолчанию.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_SoftBody3D_property_linear_stiffness:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **linear_stiffness** = ``0.5`` :ref:`🔗<class_SoftBody3D_property_linear_stiffness>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_linear_stiffness**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_linear_stiffness**\ (\ )
|
||
|
||
Более высокие значения приведут к более жесткому телу, а более низкие значения повысят способность тела гнуться. Значение может быть в диапазоне от `` 0.0 `` до `` 1.0 `` (включительно).
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_SoftBody3D_property_parent_collision_ignore:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`NodePath<class_NodePath>` **parent_collision_ignore** = ``NodePath("")`` :ref:`🔗<class_SoftBody3D_property_parent_collision_ignore>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_parent_collision_ignore**\ (\ value\: :ref:`NodePath<class_NodePath>`\ )
|
||
- :ref:`NodePath<class_NodePath>` **get_parent_collision_ignore**\ (\ )
|
||
|
||
:ref:`NodePath<class_NodePath>` к :ref:`CollisionObject3D<class_CollisionObject3D>`, из которого SoftBody3D должен избегать пересечения.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_SoftBody3D_property_pressure_coefficient:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **pressure_coefficient** = ``0.0`` :ref:`🔗<class_SoftBody3D_property_pressure_coefficient>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_pressure_coefficient**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_pressure_coefficient**\ (\ )
|
||
|
||
Коэффициент давления этого мягкого тела. Имитирует нарастание давления изнутри этого тела. Более высокие значения увеличивают силу этого эффекта.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_SoftBody3D_property_ray_pickable:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **ray_pickable** = ``true`` :ref:`🔗<class_SoftBody3D_property_ray_pickable>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_ray_pickable**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **is_ray_pickable**\ (\ )
|
||
|
||
Если ``true``, **SoftBody3D** будет реагировать на :ref:`RayCast3D<class_RayCast3D>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_SoftBody3D_property_shrinking_factor:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **shrinking_factor** = ``0.0`` :ref:`🔗<class_SoftBody3D_property_shrinking_factor>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_shrinking_factor**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_shrinking_factor**\ (\ )
|
||
|
||
Масштабирует оставшиеся длины ограничений ребер **SoftBody3D**. Положительные значения сжимают сетку, а отрицательные расширяют ее. Например, значение ``0.1`` сокращает края сетки на 10%, а ``-0.1`` расширяет края на 10%.
|
||
|
||
\ **Примечание:** :ref:`shrinking_factor<class_SoftBody3D_property_shrinking_factor>` лучше всего использовать на поверхностных сетках с закрепленными точками.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_SoftBody3D_property_simulation_precision:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`int<class_int>` **simulation_precision** = ``5`` :ref:`🔗<class_SoftBody3D_property_simulation_precision>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_simulation_precision**\ (\ value\: :ref:`int<class_int>`\ )
|
||
- :ref:`int<class_int>` **get_simulation_precision**\ (\ )
|
||
|
||
Увеличение этого значения улучшит результаты моделирования, но может повлиять на производительность. Используйте с осторожностью.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_SoftBody3D_property_total_mass:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **total_mass** = ``1.0`` :ref:`🔗<class_SoftBody3D_property_total_mass>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_total_mass**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_total_mass**\ (\ )
|
||
|
||
Масса SoftBody3D.
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Описания метода
|
||
------------------------------
|
||
|
||
.. _class_SoftBody3D_method_add_collision_exception_with:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **add_collision_exception_with**\ (\ body\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_SoftBody3D_method_add_collision_exception_with>`
|
||
|
||
Добавляет тело в список тел, с которыми данное тело не может столкнуться.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_SoftBody3D_method_apply_central_force:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **apply_central_force**\ (\ force\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_SoftBody3D_method_apply_central_force>`
|
||
|
||
Распределяет и применяет силу ко всем точкам. Сила зависит от времени и должна применяться при каждом обновлении физики.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_SoftBody3D_method_apply_central_impulse:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **apply_central_impulse**\ (\ impulse\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_SoftBody3D_method_apply_central_impulse>`
|
||
|
||
Распределяет и применяет импульс ко всем точкам.
|
||
|
||
Импульс не зависит от времени! Применение импульса в каждом кадре приведет к силе, зависящей от частоты кадров. По этой причине его следует использовать только при моделировании одноразовых ударов (в противном случае используйте функции "_force").
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_SoftBody3D_method_apply_force:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **apply_force**\ (\ point_index\: :ref:`int<class_int>`, force\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_SoftBody3D_method_apply_force>`
|
||
|
||
Прикладывает силу к точке. Сила зависит от времени и должна применяться при каждом обновлении физики.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_SoftBody3D_method_apply_impulse:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **apply_impulse**\ (\ point_index\: :ref:`int<class_int>`, impulse\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_SoftBody3D_method_apply_impulse>`
|
||
|
||
Применяет импульс к точке.
|
||
|
||
Импульс не зависит от времени! Применение импульса в каждом кадре приведет к силе, зависящей от частоты кадров. По этой причине его следует использовать только при моделировании одноразовых ударов (в противном случае используйте функции "_force").
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_SoftBody3D_method_get_collision_exceptions:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Array<class_Array>`\[:ref:`PhysicsBody3D<class_PhysicsBody3D>`\] **get_collision_exceptions**\ (\ ) :ref:`🔗<class_SoftBody3D_method_get_collision_exceptions>`
|
||
|
||
Возвращает массив узлов, которые были добавлены как исключения столкновений для этого тела.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_SoftBody3D_method_get_collision_layer_value:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **get_collision_layer_value**\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SoftBody3D_method_get_collision_layer_value>`
|
||
|
||
Возвращает, включен ли указанный слой :ref:`collision_layer<class_SoftBody3D_property_collision_layer>`, учитывая ``layer_number`` от 1 до 32.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_SoftBody3D_method_get_collision_mask_value:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **get_collision_mask_value**\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SoftBody3D_method_get_collision_mask_value>`
|
||
|
||
Возвращает, включен ли указанный слой :ref:`collision_mask<class_SoftBody3D_property_collision_mask>`, учитывая ``layer_number`` от 1 до 32.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_SoftBody3D_method_get_physics_rid:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`RID<class_RID>` **get_physics_rid**\ (\ ) |const| :ref:`🔗<class_SoftBody3D_method_get_physics_rid>`
|
||
|
||
Возвращает внутренний :ref:`RID<class_RID>`, используемый :ref:`PhysicsServer3D<class_PhysicsServer3D>` для этого тела.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_SoftBody3D_method_get_point_transform:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Vector3<class_Vector3>` **get_point_transform**\ (\ point_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_SoftBody3D_method_get_point_transform>`
|
||
|
||
Возвращает локальное смещение вершины в массиве поверхности.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_SoftBody3D_method_is_point_pinned:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **is_point_pinned**\ (\ point_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SoftBody3D_method_is_point_pinned>`
|
||
|
||
Возвращает ``true``, если вершина установлена в закрепленное состояние.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_SoftBody3D_method_remove_collision_exception_with:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **remove_collision_exception_with**\ (\ body\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_SoftBody3D_method_remove_collision_exception_with>`
|
||
|
||
Удаляет тело из списка тел, с которыми данное тело не может столкнуться.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_SoftBody3D_method_set_collision_layer_value:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_collision_layer_value**\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_SoftBody3D_method_set_collision_layer_value>`
|
||
|
||
На основе ``value`` включает или отключает указанный слой в :ref:`collision_layer<class_SoftBody3D_property_collision_layer>`, учитывая ``layer_number`` от 1 до 32.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_SoftBody3D_method_set_collision_mask_value:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_collision_mask_value**\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_SoftBody3D_method_set_collision_mask_value>`
|
||
|
||
На основе ``value`` включает или отключает указанный слой в :ref:`collision_mask<class_SoftBody3D_property_collision_mask>` при заданном ``layer_number`` от 1 до 32.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_SoftBody3D_method_set_point_pinned:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_point_pinned**\ (\ point_index\: :ref:`int<class_int>`, pinned\: :ref:`bool<class_bool>`, attachment_path\: :ref:`NodePath<class_NodePath>` = NodePath(""), insert_at\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_SoftBody3D_method_set_point_pinned>`
|
||
|
||
Устанавливает состояние закрепления вершины поверхности. Когда установлено значение ``true``, необязательный параметр ``attachment_path`` может определить :ref:`Node3D<class_Node3D>`, к которому будет прикреплена закрепленная вершина.
|
||
|
||
.. |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 (Нет возвращаемого значения.)`
|