123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560 |
- :github_url: hide
- .. meta::
- :keywords: ragdoll
- .. DO NOT EDIT THIS FILE!!!
- .. Generated automatically from Godot engine sources.
- .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
- .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/PhysicalBone3D.xml.
- .. _class_PhysicalBone3D:
- PhysicalBone3D
- ==============
- **Inherits:** :ref:`PhysicsBody3D<class_PhysicsBody3D>` **<** :ref:`CollisionObject3D<class_CollisionObject3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
- A physics body used to make bones in a :ref:`Skeleton3D<class_Skeleton3D>` react to physics.
- .. rst-class:: classref-introduction-group
- Description
- -----------
- The **PhysicalBone3D** node is a physics body that can be used to make bones in a :ref:`Skeleton3D<class_Skeleton3D>` react to physics.
- \ **Note:** In order to detect physical bones with raycasts, the :ref:`SkeletonModifier3D.active<class_SkeletonModifier3D_property_active>` property of the parent :ref:`PhysicalBoneSimulator3D<class_PhysicalBoneSimulator3D>` must be ``true`` and the :ref:`Skeleton3D<class_Skeleton3D>`'s bone must be assigned to **PhysicalBone3D** correctly; it means that :ref:`get_bone_id<class_PhysicalBone3D_method_get_bone_id>` should return a valid id (``>= 0``).
- .. rst-class:: classref-reftable-group
- Properties
- ----------
- .. table::
- :widths: auto
- +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+
- | :ref:`float<class_float>` | :ref:`angular_damp<class_PhysicalBone3D_property_angular_damp>` | ``0.0`` |
- +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+
- | :ref:`DampMode<enum_PhysicalBone3D_DampMode>` | :ref:`angular_damp_mode<class_PhysicalBone3D_property_angular_damp_mode>` | ``0`` |
- +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+
- | :ref:`Vector3<class_Vector3>` | :ref:`angular_velocity<class_PhysicalBone3D_property_angular_velocity>` | ``Vector3(0, 0, 0)`` |
- +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+
- | :ref:`Transform3D<class_Transform3D>` | :ref:`body_offset<class_PhysicalBone3D_property_body_offset>` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` |
- +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+
- | :ref:`float<class_float>` | :ref:`bounce<class_PhysicalBone3D_property_bounce>` | ``0.0`` |
- +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`can_sleep<class_PhysicalBone3D_property_can_sleep>` | ``true`` |
- +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`custom_integrator<class_PhysicalBone3D_property_custom_integrator>` | ``false`` |
- +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+
- | :ref:`float<class_float>` | :ref:`friction<class_PhysicalBone3D_property_friction>` | ``1.0`` |
- +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+
- | :ref:`float<class_float>` | :ref:`gravity_scale<class_PhysicalBone3D_property_gravity_scale>` | ``1.0`` |
- +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+
- | :ref:`Transform3D<class_Transform3D>` | :ref:`joint_offset<class_PhysicalBone3D_property_joint_offset>` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` |
- +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+
- | :ref:`Vector3<class_Vector3>` | :ref:`joint_rotation<class_PhysicalBone3D_property_joint_rotation>` | ``Vector3(0, 0, 0)`` |
- +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+
- | :ref:`JointType<enum_PhysicalBone3D_JointType>` | :ref:`joint_type<class_PhysicalBone3D_property_joint_type>` | ``0`` |
- +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+
- | :ref:`float<class_float>` | :ref:`linear_damp<class_PhysicalBone3D_property_linear_damp>` | ``0.0`` |
- +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+
- | :ref:`DampMode<enum_PhysicalBone3D_DampMode>` | :ref:`linear_damp_mode<class_PhysicalBone3D_property_linear_damp_mode>` | ``0`` |
- +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+
- | :ref:`Vector3<class_Vector3>` | :ref:`linear_velocity<class_PhysicalBone3D_property_linear_velocity>` | ``Vector3(0, 0, 0)`` |
- +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+
- | :ref:`float<class_float>` | :ref:`mass<class_PhysicalBone3D_property_mass>` | ``1.0`` |
- +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+
- .. rst-class:: classref-reftable-group
- Methods
- -------
- .. table::
- :widths: auto
- +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | |void| | :ref:`_integrate_forces<class_PhysicalBone3D_private_method__integrate_forces>`\ (\ state\: :ref:`PhysicsDirectBodyState3D<class_PhysicsDirectBodyState3D>`\ ) |virtual| |
- +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | |void| | :ref:`apply_central_impulse<class_PhysicalBone3D_method_apply_central_impulse>`\ (\ impulse\: :ref:`Vector3<class_Vector3>`\ ) |
- +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | |void| | :ref:`apply_impulse<class_PhysicalBone3D_method_apply_impulse>`\ (\ impulse\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) |
- +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_bone_id<class_PhysicalBone3D_method_get_bone_id>`\ (\ ) |const| |
- +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`get_simulate_physics<class_PhysicalBone3D_method_get_simulate_physics>`\ (\ ) |
- +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_simulating_physics<class_PhysicalBone3D_method_is_simulating_physics>`\ (\ ) |
- +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Enumerations
- ------------
- .. _enum_PhysicalBone3D_DampMode:
- .. rst-class:: classref-enumeration
- enum **DampMode**: :ref:`🔗<enum_PhysicalBone3D_DampMode>`
- .. _class_PhysicalBone3D_constant_DAMP_MODE_COMBINE:
- .. rst-class:: classref-enumeration-constant
- :ref:`DampMode<enum_PhysicalBone3D_DampMode>` **DAMP_MODE_COMBINE** = ``0``
- In this mode, the body's damping value is added to any value set in areas or the default value.
- .. _class_PhysicalBone3D_constant_DAMP_MODE_REPLACE:
- .. rst-class:: classref-enumeration-constant
- :ref:`DampMode<enum_PhysicalBone3D_DampMode>` **DAMP_MODE_REPLACE** = ``1``
- In this mode, the body's damping value replaces any value set in areas or the default value.
- .. rst-class:: classref-item-separator
- ----
- .. _enum_PhysicalBone3D_JointType:
- .. rst-class:: classref-enumeration
- enum **JointType**: :ref:`🔗<enum_PhysicalBone3D_JointType>`
- .. _class_PhysicalBone3D_constant_JOINT_TYPE_NONE:
- .. rst-class:: classref-enumeration-constant
- :ref:`JointType<enum_PhysicalBone3D_JointType>` **JOINT_TYPE_NONE** = ``0``
- No joint is applied to the PhysicsBone3D.
- .. _class_PhysicalBone3D_constant_JOINT_TYPE_PIN:
- .. rst-class:: classref-enumeration-constant
- :ref:`JointType<enum_PhysicalBone3D_JointType>` **JOINT_TYPE_PIN** = ``1``
- A pin joint is applied to the PhysicsBone3D.
- .. _class_PhysicalBone3D_constant_JOINT_TYPE_CONE:
- .. rst-class:: classref-enumeration-constant
- :ref:`JointType<enum_PhysicalBone3D_JointType>` **JOINT_TYPE_CONE** = ``2``
- A cone joint is applied to the PhysicsBone3D.
- .. _class_PhysicalBone3D_constant_JOINT_TYPE_HINGE:
- .. rst-class:: classref-enumeration-constant
- :ref:`JointType<enum_PhysicalBone3D_JointType>` **JOINT_TYPE_HINGE** = ``3``
- A hinge joint is applied to the PhysicsBone3D.
- .. _class_PhysicalBone3D_constant_JOINT_TYPE_SLIDER:
- .. rst-class:: classref-enumeration-constant
- :ref:`JointType<enum_PhysicalBone3D_JointType>` **JOINT_TYPE_SLIDER** = ``4``
- A slider joint is applied to the PhysicsBone3D.
- .. _class_PhysicalBone3D_constant_JOINT_TYPE_6DOF:
- .. rst-class:: classref-enumeration-constant
- :ref:`JointType<enum_PhysicalBone3D_JointType>` **JOINT_TYPE_6DOF** = ``5``
- A 6 degrees of freedom joint is applied to the PhysicsBone3D.
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Property Descriptions
- ---------------------
- .. _class_PhysicalBone3D_property_angular_damp:
- .. rst-class:: classref-property
- :ref:`float<class_float>` **angular_damp** = ``0.0`` :ref:`🔗<class_PhysicalBone3D_property_angular_damp>`
- .. rst-class:: classref-property-setget
- - |void| **set_angular_damp**\ (\ value\: :ref:`float<class_float>`\ )
- - :ref:`float<class_float>` **get_angular_damp**\ (\ )
- Damps the body's rotation. By default, the body will use the :ref:`ProjectSettings.physics/3d/default_angular_damp<class_ProjectSettings_property_physics/3d/default_angular_damp>` project setting or any value override set by an :ref:`Area3D<class_Area3D>` the body is in. Depending on :ref:`angular_damp_mode<class_PhysicalBone3D_property_angular_damp_mode>`, you can set :ref:`angular_damp<class_PhysicalBone3D_property_angular_damp>` to be added to or to replace the body's damping value.
- See :ref:`ProjectSettings.physics/3d/default_angular_damp<class_ProjectSettings_property_physics/3d/default_angular_damp>` for more details about damping.
- .. rst-class:: classref-item-separator
- ----
- .. _class_PhysicalBone3D_property_angular_damp_mode:
- .. rst-class:: classref-property
- :ref:`DampMode<enum_PhysicalBone3D_DampMode>` **angular_damp_mode** = ``0`` :ref:`🔗<class_PhysicalBone3D_property_angular_damp_mode>`
- .. rst-class:: classref-property-setget
- - |void| **set_angular_damp_mode**\ (\ value\: :ref:`DampMode<enum_PhysicalBone3D_DampMode>`\ )
- - :ref:`DampMode<enum_PhysicalBone3D_DampMode>` **get_angular_damp_mode**\ (\ )
- Defines how :ref:`angular_damp<class_PhysicalBone3D_property_angular_damp>` is applied. See :ref:`DampMode<enum_PhysicalBone3D_DampMode>` for possible values.
- .. rst-class:: classref-item-separator
- ----
- .. _class_PhysicalBone3D_property_angular_velocity:
- .. rst-class:: classref-property
- :ref:`Vector3<class_Vector3>` **angular_velocity** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_PhysicalBone3D_property_angular_velocity>`
- .. rst-class:: classref-property-setget
- - |void| **set_angular_velocity**\ (\ value\: :ref:`Vector3<class_Vector3>`\ )
- - :ref:`Vector3<class_Vector3>` **get_angular_velocity**\ (\ )
- The PhysicalBone3D's rotational velocity in *radians* per second.
- .. rst-class:: classref-item-separator
- ----
- .. _class_PhysicalBone3D_property_body_offset:
- .. rst-class:: classref-property
- :ref:`Transform3D<class_Transform3D>` **body_offset** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` :ref:`🔗<class_PhysicalBone3D_property_body_offset>`
- .. rst-class:: classref-property-setget
- - |void| **set_body_offset**\ (\ value\: :ref:`Transform3D<class_Transform3D>`\ )
- - :ref:`Transform3D<class_Transform3D>` **get_body_offset**\ (\ )
- Sets the body's transform.
- .. rst-class:: classref-item-separator
- ----
- .. _class_PhysicalBone3D_property_bounce:
- .. rst-class:: classref-property
- :ref:`float<class_float>` **bounce** = ``0.0`` :ref:`🔗<class_PhysicalBone3D_property_bounce>`
- .. rst-class:: classref-property-setget
- - |void| **set_bounce**\ (\ value\: :ref:`float<class_float>`\ )
- - :ref:`float<class_float>` **get_bounce**\ (\ )
- The body's bounciness. Values range from ``0`` (no bounce) to ``1`` (full bounciness).
- \ **Note:** Even with :ref:`bounce<class_PhysicalBone3D_property_bounce>` set to ``1.0``, some energy will be lost over time due to linear and angular damping. To have a **PhysicalBone3D** that preserves all its energy over time, set :ref:`bounce<class_PhysicalBone3D_property_bounce>` to ``1.0``, :ref:`linear_damp_mode<class_PhysicalBone3D_property_linear_damp_mode>` to :ref:`DAMP_MODE_REPLACE<class_PhysicalBone3D_constant_DAMP_MODE_REPLACE>`, :ref:`linear_damp<class_PhysicalBone3D_property_linear_damp>` to ``0.0``, :ref:`angular_damp_mode<class_PhysicalBone3D_property_angular_damp_mode>` to :ref:`DAMP_MODE_REPLACE<class_PhysicalBone3D_constant_DAMP_MODE_REPLACE>`, and :ref:`angular_damp<class_PhysicalBone3D_property_angular_damp>` to ``0.0``.
- .. rst-class:: classref-item-separator
- ----
- .. _class_PhysicalBone3D_property_can_sleep:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **can_sleep** = ``true`` :ref:`🔗<class_PhysicalBone3D_property_can_sleep>`
- .. rst-class:: classref-property-setget
- - |void| **set_can_sleep**\ (\ value\: :ref:`bool<class_bool>`\ )
- - :ref:`bool<class_bool>` **is_able_to_sleep**\ (\ )
- If ``true``, the body is deactivated when there is no movement, so it will not take part in the simulation until it is awakened by an external force.
- .. rst-class:: classref-item-separator
- ----
- .. _class_PhysicalBone3D_property_custom_integrator:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **custom_integrator** = ``false`` :ref:`🔗<class_PhysicalBone3D_property_custom_integrator>`
- .. rst-class:: classref-property-setget
- - |void| **set_use_custom_integrator**\ (\ value\: :ref:`bool<class_bool>`\ )
- - :ref:`bool<class_bool>` **is_using_custom_integrator**\ (\ )
- If ``true``, the standard force integration (like gravity or damping) will be disabled for this body. Other than collision response, the body will only move as determined by the :ref:`_integrate_forces<class_PhysicalBone3D_private_method__integrate_forces>` method, if that virtual method is overridden.
- Setting this property will call the method :ref:`PhysicsServer3D.body_set_omit_force_integration<class_PhysicsServer3D_method_body_set_omit_force_integration>` internally.
- .. rst-class:: classref-item-separator
- ----
- .. _class_PhysicalBone3D_property_friction:
- .. rst-class:: classref-property
- :ref:`float<class_float>` **friction** = ``1.0`` :ref:`🔗<class_PhysicalBone3D_property_friction>`
- .. rst-class:: classref-property-setget
- - |void| **set_friction**\ (\ value\: :ref:`float<class_float>`\ )
- - :ref:`float<class_float>` **get_friction**\ (\ )
- The body's friction, from ``0`` (frictionless) to ``1`` (max friction).
- .. rst-class:: classref-item-separator
- ----
- .. _class_PhysicalBone3D_property_gravity_scale:
- .. rst-class:: classref-property
- :ref:`float<class_float>` **gravity_scale** = ``1.0`` :ref:`🔗<class_PhysicalBone3D_property_gravity_scale>`
- .. rst-class:: classref-property-setget
- - |void| **set_gravity_scale**\ (\ value\: :ref:`float<class_float>`\ )
- - :ref:`float<class_float>` **get_gravity_scale**\ (\ )
- This is multiplied by :ref:`ProjectSettings.physics/3d/default_gravity<class_ProjectSettings_property_physics/3d/default_gravity>` to produce this body's gravity. For example, a value of ``1.0`` will apply normal gravity, ``2.0`` will apply double the gravity, and ``0.5`` will apply half the gravity to this body.
- .. rst-class:: classref-item-separator
- ----
- .. _class_PhysicalBone3D_property_joint_offset:
- .. rst-class:: classref-property
- :ref:`Transform3D<class_Transform3D>` **joint_offset** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` :ref:`🔗<class_PhysicalBone3D_property_joint_offset>`
- .. rst-class:: classref-property-setget
- - |void| **set_joint_offset**\ (\ value\: :ref:`Transform3D<class_Transform3D>`\ )
- - :ref:`Transform3D<class_Transform3D>` **get_joint_offset**\ (\ )
- Sets the joint's transform.
- .. rst-class:: classref-item-separator
- ----
- .. _class_PhysicalBone3D_property_joint_rotation:
- .. rst-class:: classref-property
- :ref:`Vector3<class_Vector3>` **joint_rotation** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_PhysicalBone3D_property_joint_rotation>`
- .. rst-class:: classref-property-setget
- - |void| **set_joint_rotation**\ (\ value\: :ref:`Vector3<class_Vector3>`\ )
- - :ref:`Vector3<class_Vector3>` **get_joint_rotation**\ (\ )
- Sets the joint's rotation in radians.
- .. rst-class:: classref-item-separator
- ----
- .. _class_PhysicalBone3D_property_joint_type:
- .. rst-class:: classref-property
- :ref:`JointType<enum_PhysicalBone3D_JointType>` **joint_type** = ``0`` :ref:`🔗<class_PhysicalBone3D_property_joint_type>`
- .. rst-class:: classref-property-setget
- - |void| **set_joint_type**\ (\ value\: :ref:`JointType<enum_PhysicalBone3D_JointType>`\ )
- - :ref:`JointType<enum_PhysicalBone3D_JointType>` **get_joint_type**\ (\ )
- Sets the joint type. See :ref:`JointType<enum_PhysicalBone3D_JointType>` for possible values.
- .. rst-class:: classref-item-separator
- ----
- .. _class_PhysicalBone3D_property_linear_damp:
- .. rst-class:: classref-property
- :ref:`float<class_float>` **linear_damp** = ``0.0`` :ref:`🔗<class_PhysicalBone3D_property_linear_damp>`
- .. rst-class:: classref-property-setget
- - |void| **set_linear_damp**\ (\ value\: :ref:`float<class_float>`\ )
- - :ref:`float<class_float>` **get_linear_damp**\ (\ )
- Damps the body's movement. By default, the body will use :ref:`ProjectSettings.physics/3d/default_linear_damp<class_ProjectSettings_property_physics/3d/default_linear_damp>` or any value override set by an :ref:`Area3D<class_Area3D>` the body is in. Depending on :ref:`linear_damp_mode<class_PhysicalBone3D_property_linear_damp_mode>`, :ref:`linear_damp<class_PhysicalBone3D_property_linear_damp>` may be added to or replace the body's damping value.
- See :ref:`ProjectSettings.physics/3d/default_linear_damp<class_ProjectSettings_property_physics/3d/default_linear_damp>` for more details about damping.
- .. rst-class:: classref-item-separator
- ----
- .. _class_PhysicalBone3D_property_linear_damp_mode:
- .. rst-class:: classref-property
- :ref:`DampMode<enum_PhysicalBone3D_DampMode>` **linear_damp_mode** = ``0`` :ref:`🔗<class_PhysicalBone3D_property_linear_damp_mode>`
- .. rst-class:: classref-property-setget
- - |void| **set_linear_damp_mode**\ (\ value\: :ref:`DampMode<enum_PhysicalBone3D_DampMode>`\ )
- - :ref:`DampMode<enum_PhysicalBone3D_DampMode>` **get_linear_damp_mode**\ (\ )
- Defines how :ref:`linear_damp<class_PhysicalBone3D_property_linear_damp>` is applied. See :ref:`DampMode<enum_PhysicalBone3D_DampMode>` for possible values.
- .. rst-class:: classref-item-separator
- ----
- .. _class_PhysicalBone3D_property_linear_velocity:
- .. rst-class:: classref-property
- :ref:`Vector3<class_Vector3>` **linear_velocity** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_PhysicalBone3D_property_linear_velocity>`
- .. rst-class:: classref-property-setget
- - |void| **set_linear_velocity**\ (\ value\: :ref:`Vector3<class_Vector3>`\ )
- - :ref:`Vector3<class_Vector3>` **get_linear_velocity**\ (\ )
- The body's linear velocity in units per second. Can be used sporadically, but **don't set this every frame**, because physics may run in another thread and runs at a different granularity. Use :ref:`_integrate_forces<class_PhysicalBone3D_private_method__integrate_forces>` as your process loop for precise control of the body state.
- .. rst-class:: classref-item-separator
- ----
- .. _class_PhysicalBone3D_property_mass:
- .. rst-class:: classref-property
- :ref:`float<class_float>` **mass** = ``1.0`` :ref:`🔗<class_PhysicalBone3D_property_mass>`
- .. rst-class:: classref-property-setget
- - |void| **set_mass**\ (\ value\: :ref:`float<class_float>`\ )
- - :ref:`float<class_float>` **get_mass**\ (\ )
- The body's mass.
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Method Descriptions
- -------------------
- .. _class_PhysicalBone3D_private_method__integrate_forces:
- .. rst-class:: classref-method
- |void| **_integrate_forces**\ (\ state\: :ref:`PhysicsDirectBodyState3D<class_PhysicsDirectBodyState3D>`\ ) |virtual| :ref:`🔗<class_PhysicalBone3D_private_method__integrate_forces>`
- Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default, it is called before the standard force integration, but the :ref:`custom_integrator<class_PhysicalBone3D_property_custom_integrator>` property allows you to disable the standard force integration and do fully custom force integration for a body.
- .. rst-class:: classref-item-separator
- ----
- .. _class_PhysicalBone3D_method_apply_central_impulse:
- .. rst-class:: classref-method
- |void| **apply_central_impulse**\ (\ impulse\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_PhysicalBone3D_method_apply_central_impulse>`
- Applies a directional impulse without affecting rotation.
- 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 "_integrate_forces" functions otherwise).
- This is equivalent to using :ref:`apply_impulse<class_PhysicalBone3D_method_apply_impulse>` at the body's center of mass.
- .. rst-class:: classref-item-separator
- ----
- .. _class_PhysicalBone3D_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_PhysicalBone3D_method_apply_impulse>`
- Applies a positioned impulse to the PhysicsBone3D.
- 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 "_integrate_forces" functions otherwise).
- \ ``position`` is the offset from the PhysicsBone3D origin in global coordinates.
- .. rst-class:: classref-item-separator
- ----
- .. _class_PhysicalBone3D_method_get_bone_id:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_bone_id**\ (\ ) |const| :ref:`🔗<class_PhysicalBone3D_method_get_bone_id>`
- Returns the unique identifier of the PhysicsBone3D.
- .. rst-class:: classref-item-separator
- ----
- .. _class_PhysicalBone3D_method_get_simulate_physics:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **get_simulate_physics**\ (\ ) :ref:`🔗<class_PhysicalBone3D_method_get_simulate_physics>`
- Returns ``true`` if the PhysicsBone3D is allowed to simulate physics.
- .. rst-class:: classref-item-separator
- ----
- .. _class_PhysicalBone3D_method_is_simulating_physics:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **is_simulating_physics**\ (\ ) :ref:`🔗<class_PhysicalBone3D_method_is_simulating_physics>`
- Returns ``true`` if the PhysicsBone3D is currently simulating physics.
- .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
- .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
- .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
- .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
- .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
- .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
- .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
- .. |void| replace:: :abbr:`void (No return value.)`
|