class_physicalbone3d.rst 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560
  1. :github_url: hide
  2. .. meta::
  3. :keywords: ragdoll
  4. .. DO NOT EDIT THIS FILE!!!
  5. .. Generated automatically from Godot engine sources.
  6. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  7. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/PhysicalBone3D.xml.
  8. .. _class_PhysicalBone3D:
  9. PhysicalBone3D
  10. ==============
  11. **Inherits:** :ref:`PhysicsBody3D<class_PhysicsBody3D>` **<** :ref:`CollisionObject3D<class_CollisionObject3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  12. A physics body used to make bones in a :ref:`Skeleton3D<class_Skeleton3D>` react to physics.
  13. .. rst-class:: classref-introduction-group
  14. Description
  15. -----------
  16. The **PhysicalBone3D** node is a physics body that can be used to make bones in a :ref:`Skeleton3D<class_Skeleton3D>` react to physics.
  17. \ **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``).
  18. .. rst-class:: classref-reftable-group
  19. Properties
  20. ----------
  21. .. table::
  22. :widths: auto
  23. +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+
  24. | :ref:`float<class_float>` | :ref:`angular_damp<class_PhysicalBone3D_property_angular_damp>` | ``0.0`` |
  25. +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+
  26. | :ref:`DampMode<enum_PhysicalBone3D_DampMode>` | :ref:`angular_damp_mode<class_PhysicalBone3D_property_angular_damp_mode>` | ``0`` |
  27. +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+
  28. | :ref:`Vector3<class_Vector3>` | :ref:`angular_velocity<class_PhysicalBone3D_property_angular_velocity>` | ``Vector3(0, 0, 0)`` |
  29. +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+
  30. | :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)`` |
  31. +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+
  32. | :ref:`float<class_float>` | :ref:`bounce<class_PhysicalBone3D_property_bounce>` | ``0.0`` |
  33. +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+
  34. | :ref:`bool<class_bool>` | :ref:`can_sleep<class_PhysicalBone3D_property_can_sleep>` | ``true`` |
  35. +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+
  36. | :ref:`bool<class_bool>` | :ref:`custom_integrator<class_PhysicalBone3D_property_custom_integrator>` | ``false`` |
  37. +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+
  38. | :ref:`float<class_float>` | :ref:`friction<class_PhysicalBone3D_property_friction>` | ``1.0`` |
  39. +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+
  40. | :ref:`float<class_float>` | :ref:`gravity_scale<class_PhysicalBone3D_property_gravity_scale>` | ``1.0`` |
  41. +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+
  42. | :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)`` |
  43. +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+
  44. | :ref:`Vector3<class_Vector3>` | :ref:`joint_rotation<class_PhysicalBone3D_property_joint_rotation>` | ``Vector3(0, 0, 0)`` |
  45. +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+
  46. | :ref:`JointType<enum_PhysicalBone3D_JointType>` | :ref:`joint_type<class_PhysicalBone3D_property_joint_type>` | ``0`` |
  47. +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+
  48. | :ref:`float<class_float>` | :ref:`linear_damp<class_PhysicalBone3D_property_linear_damp>` | ``0.0`` |
  49. +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+
  50. | :ref:`DampMode<enum_PhysicalBone3D_DampMode>` | :ref:`linear_damp_mode<class_PhysicalBone3D_property_linear_damp_mode>` | ``0`` |
  51. +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+
  52. | :ref:`Vector3<class_Vector3>` | :ref:`linear_velocity<class_PhysicalBone3D_property_linear_velocity>` | ``Vector3(0, 0, 0)`` |
  53. +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+
  54. | :ref:`float<class_float>` | :ref:`mass<class_PhysicalBone3D_property_mass>` | ``1.0`` |
  55. +-------------------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+
  56. .. rst-class:: classref-reftable-group
  57. Methods
  58. -------
  59. .. table::
  60. :widths: auto
  61. +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  62. | |void| | :ref:`_integrate_forces<class_PhysicalBone3D_private_method__integrate_forces>`\ (\ state\: :ref:`PhysicsDirectBodyState3D<class_PhysicsDirectBodyState3D>`\ ) |virtual| |
  63. +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  64. | |void| | :ref:`apply_central_impulse<class_PhysicalBone3D_method_apply_central_impulse>`\ (\ impulse\: :ref:`Vector3<class_Vector3>`\ ) |
  65. +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  66. | |void| | :ref:`apply_impulse<class_PhysicalBone3D_method_apply_impulse>`\ (\ impulse\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) |
  67. +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  68. | :ref:`int<class_int>` | :ref:`get_bone_id<class_PhysicalBone3D_method_get_bone_id>`\ (\ ) |const| |
  69. +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  70. | :ref:`bool<class_bool>` | :ref:`get_simulate_physics<class_PhysicalBone3D_method_get_simulate_physics>`\ (\ ) |
  71. +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  72. | :ref:`bool<class_bool>` | :ref:`is_simulating_physics<class_PhysicalBone3D_method_is_simulating_physics>`\ (\ ) |
  73. +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  74. .. rst-class:: classref-section-separator
  75. ----
  76. .. rst-class:: classref-descriptions-group
  77. Enumerations
  78. ------------
  79. .. _enum_PhysicalBone3D_DampMode:
  80. .. rst-class:: classref-enumeration
  81. enum **DampMode**: :ref:`🔗<enum_PhysicalBone3D_DampMode>`
  82. .. _class_PhysicalBone3D_constant_DAMP_MODE_COMBINE:
  83. .. rst-class:: classref-enumeration-constant
  84. :ref:`DampMode<enum_PhysicalBone3D_DampMode>` **DAMP_MODE_COMBINE** = ``0``
  85. In this mode, the body's damping value is added to any value set in areas or the default value.
  86. .. _class_PhysicalBone3D_constant_DAMP_MODE_REPLACE:
  87. .. rst-class:: classref-enumeration-constant
  88. :ref:`DampMode<enum_PhysicalBone3D_DampMode>` **DAMP_MODE_REPLACE** = ``1``
  89. In this mode, the body's damping value replaces any value set in areas or the default value.
  90. .. rst-class:: classref-item-separator
  91. ----
  92. .. _enum_PhysicalBone3D_JointType:
  93. .. rst-class:: classref-enumeration
  94. enum **JointType**: :ref:`🔗<enum_PhysicalBone3D_JointType>`
  95. .. _class_PhysicalBone3D_constant_JOINT_TYPE_NONE:
  96. .. rst-class:: classref-enumeration-constant
  97. :ref:`JointType<enum_PhysicalBone3D_JointType>` **JOINT_TYPE_NONE** = ``0``
  98. No joint is applied to the PhysicsBone3D.
  99. .. _class_PhysicalBone3D_constant_JOINT_TYPE_PIN:
  100. .. rst-class:: classref-enumeration-constant
  101. :ref:`JointType<enum_PhysicalBone3D_JointType>` **JOINT_TYPE_PIN** = ``1``
  102. A pin joint is applied to the PhysicsBone3D.
  103. .. _class_PhysicalBone3D_constant_JOINT_TYPE_CONE:
  104. .. rst-class:: classref-enumeration-constant
  105. :ref:`JointType<enum_PhysicalBone3D_JointType>` **JOINT_TYPE_CONE** = ``2``
  106. A cone joint is applied to the PhysicsBone3D.
  107. .. _class_PhysicalBone3D_constant_JOINT_TYPE_HINGE:
  108. .. rst-class:: classref-enumeration-constant
  109. :ref:`JointType<enum_PhysicalBone3D_JointType>` **JOINT_TYPE_HINGE** = ``3``
  110. A hinge joint is applied to the PhysicsBone3D.
  111. .. _class_PhysicalBone3D_constant_JOINT_TYPE_SLIDER:
  112. .. rst-class:: classref-enumeration-constant
  113. :ref:`JointType<enum_PhysicalBone3D_JointType>` **JOINT_TYPE_SLIDER** = ``4``
  114. A slider joint is applied to the PhysicsBone3D.
  115. .. _class_PhysicalBone3D_constant_JOINT_TYPE_6DOF:
  116. .. rst-class:: classref-enumeration-constant
  117. :ref:`JointType<enum_PhysicalBone3D_JointType>` **JOINT_TYPE_6DOF** = ``5``
  118. A 6 degrees of freedom joint is applied to the PhysicsBone3D.
  119. .. rst-class:: classref-section-separator
  120. ----
  121. .. rst-class:: classref-descriptions-group
  122. Property Descriptions
  123. ---------------------
  124. .. _class_PhysicalBone3D_property_angular_damp:
  125. .. rst-class:: classref-property
  126. :ref:`float<class_float>` **angular_damp** = ``0.0`` :ref:`🔗<class_PhysicalBone3D_property_angular_damp>`
  127. .. rst-class:: classref-property-setget
  128. - |void| **set_angular_damp**\ (\ value\: :ref:`float<class_float>`\ )
  129. - :ref:`float<class_float>` **get_angular_damp**\ (\ )
  130. 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.
  131. See :ref:`ProjectSettings.physics/3d/default_angular_damp<class_ProjectSettings_property_physics/3d/default_angular_damp>` for more details about damping.
  132. .. rst-class:: classref-item-separator
  133. ----
  134. .. _class_PhysicalBone3D_property_angular_damp_mode:
  135. .. rst-class:: classref-property
  136. :ref:`DampMode<enum_PhysicalBone3D_DampMode>` **angular_damp_mode** = ``0`` :ref:`🔗<class_PhysicalBone3D_property_angular_damp_mode>`
  137. .. rst-class:: classref-property-setget
  138. - |void| **set_angular_damp_mode**\ (\ value\: :ref:`DampMode<enum_PhysicalBone3D_DampMode>`\ )
  139. - :ref:`DampMode<enum_PhysicalBone3D_DampMode>` **get_angular_damp_mode**\ (\ )
  140. Defines how :ref:`angular_damp<class_PhysicalBone3D_property_angular_damp>` is applied. See :ref:`DampMode<enum_PhysicalBone3D_DampMode>` for possible values.
  141. .. rst-class:: classref-item-separator
  142. ----
  143. .. _class_PhysicalBone3D_property_angular_velocity:
  144. .. rst-class:: classref-property
  145. :ref:`Vector3<class_Vector3>` **angular_velocity** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_PhysicalBone3D_property_angular_velocity>`
  146. .. rst-class:: classref-property-setget
  147. - |void| **set_angular_velocity**\ (\ value\: :ref:`Vector3<class_Vector3>`\ )
  148. - :ref:`Vector3<class_Vector3>` **get_angular_velocity**\ (\ )
  149. The PhysicalBone3D's rotational velocity in *radians* per second.
  150. .. rst-class:: classref-item-separator
  151. ----
  152. .. _class_PhysicalBone3D_property_body_offset:
  153. .. rst-class:: classref-property
  154. :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>`
  155. .. rst-class:: classref-property-setget
  156. - |void| **set_body_offset**\ (\ value\: :ref:`Transform3D<class_Transform3D>`\ )
  157. - :ref:`Transform3D<class_Transform3D>` **get_body_offset**\ (\ )
  158. Sets the body's transform.
  159. .. rst-class:: classref-item-separator
  160. ----
  161. .. _class_PhysicalBone3D_property_bounce:
  162. .. rst-class:: classref-property
  163. :ref:`float<class_float>` **bounce** = ``0.0`` :ref:`🔗<class_PhysicalBone3D_property_bounce>`
  164. .. rst-class:: classref-property-setget
  165. - |void| **set_bounce**\ (\ value\: :ref:`float<class_float>`\ )
  166. - :ref:`float<class_float>` **get_bounce**\ (\ )
  167. The body's bounciness. Values range from ``0`` (no bounce) to ``1`` (full bounciness).
  168. \ **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``.
  169. .. rst-class:: classref-item-separator
  170. ----
  171. .. _class_PhysicalBone3D_property_can_sleep:
  172. .. rst-class:: classref-property
  173. :ref:`bool<class_bool>` **can_sleep** = ``true`` :ref:`🔗<class_PhysicalBone3D_property_can_sleep>`
  174. .. rst-class:: classref-property-setget
  175. - |void| **set_can_sleep**\ (\ value\: :ref:`bool<class_bool>`\ )
  176. - :ref:`bool<class_bool>` **is_able_to_sleep**\ (\ )
  177. 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.
  178. .. rst-class:: classref-item-separator
  179. ----
  180. .. _class_PhysicalBone3D_property_custom_integrator:
  181. .. rst-class:: classref-property
  182. :ref:`bool<class_bool>` **custom_integrator** = ``false`` :ref:`🔗<class_PhysicalBone3D_property_custom_integrator>`
  183. .. rst-class:: classref-property-setget
  184. - |void| **set_use_custom_integrator**\ (\ value\: :ref:`bool<class_bool>`\ )
  185. - :ref:`bool<class_bool>` **is_using_custom_integrator**\ (\ )
  186. 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.
  187. Setting this property will call the method :ref:`PhysicsServer3D.body_set_omit_force_integration<class_PhysicsServer3D_method_body_set_omit_force_integration>` internally.
  188. .. rst-class:: classref-item-separator
  189. ----
  190. .. _class_PhysicalBone3D_property_friction:
  191. .. rst-class:: classref-property
  192. :ref:`float<class_float>` **friction** = ``1.0`` :ref:`🔗<class_PhysicalBone3D_property_friction>`
  193. .. rst-class:: classref-property-setget
  194. - |void| **set_friction**\ (\ value\: :ref:`float<class_float>`\ )
  195. - :ref:`float<class_float>` **get_friction**\ (\ )
  196. The body's friction, from ``0`` (frictionless) to ``1`` (max friction).
  197. .. rst-class:: classref-item-separator
  198. ----
  199. .. _class_PhysicalBone3D_property_gravity_scale:
  200. .. rst-class:: classref-property
  201. :ref:`float<class_float>` **gravity_scale** = ``1.0`` :ref:`🔗<class_PhysicalBone3D_property_gravity_scale>`
  202. .. rst-class:: classref-property-setget
  203. - |void| **set_gravity_scale**\ (\ value\: :ref:`float<class_float>`\ )
  204. - :ref:`float<class_float>` **get_gravity_scale**\ (\ )
  205. 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.
  206. .. rst-class:: classref-item-separator
  207. ----
  208. .. _class_PhysicalBone3D_property_joint_offset:
  209. .. rst-class:: classref-property
  210. :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>`
  211. .. rst-class:: classref-property-setget
  212. - |void| **set_joint_offset**\ (\ value\: :ref:`Transform3D<class_Transform3D>`\ )
  213. - :ref:`Transform3D<class_Transform3D>` **get_joint_offset**\ (\ )
  214. Sets the joint's transform.
  215. .. rst-class:: classref-item-separator
  216. ----
  217. .. _class_PhysicalBone3D_property_joint_rotation:
  218. .. rst-class:: classref-property
  219. :ref:`Vector3<class_Vector3>` **joint_rotation** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_PhysicalBone3D_property_joint_rotation>`
  220. .. rst-class:: classref-property-setget
  221. - |void| **set_joint_rotation**\ (\ value\: :ref:`Vector3<class_Vector3>`\ )
  222. - :ref:`Vector3<class_Vector3>` **get_joint_rotation**\ (\ )
  223. Sets the joint's rotation in radians.
  224. .. rst-class:: classref-item-separator
  225. ----
  226. .. _class_PhysicalBone3D_property_joint_type:
  227. .. rst-class:: classref-property
  228. :ref:`JointType<enum_PhysicalBone3D_JointType>` **joint_type** = ``0`` :ref:`🔗<class_PhysicalBone3D_property_joint_type>`
  229. .. rst-class:: classref-property-setget
  230. - |void| **set_joint_type**\ (\ value\: :ref:`JointType<enum_PhysicalBone3D_JointType>`\ )
  231. - :ref:`JointType<enum_PhysicalBone3D_JointType>` **get_joint_type**\ (\ )
  232. Sets the joint type. See :ref:`JointType<enum_PhysicalBone3D_JointType>` for possible values.
  233. .. rst-class:: classref-item-separator
  234. ----
  235. .. _class_PhysicalBone3D_property_linear_damp:
  236. .. rst-class:: classref-property
  237. :ref:`float<class_float>` **linear_damp** = ``0.0`` :ref:`🔗<class_PhysicalBone3D_property_linear_damp>`
  238. .. rst-class:: classref-property-setget
  239. - |void| **set_linear_damp**\ (\ value\: :ref:`float<class_float>`\ )
  240. - :ref:`float<class_float>` **get_linear_damp**\ (\ )
  241. 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.
  242. See :ref:`ProjectSettings.physics/3d/default_linear_damp<class_ProjectSettings_property_physics/3d/default_linear_damp>` for more details about damping.
  243. .. rst-class:: classref-item-separator
  244. ----
  245. .. _class_PhysicalBone3D_property_linear_damp_mode:
  246. .. rst-class:: classref-property
  247. :ref:`DampMode<enum_PhysicalBone3D_DampMode>` **linear_damp_mode** = ``0`` :ref:`🔗<class_PhysicalBone3D_property_linear_damp_mode>`
  248. .. rst-class:: classref-property-setget
  249. - |void| **set_linear_damp_mode**\ (\ value\: :ref:`DampMode<enum_PhysicalBone3D_DampMode>`\ )
  250. - :ref:`DampMode<enum_PhysicalBone3D_DampMode>` **get_linear_damp_mode**\ (\ )
  251. Defines how :ref:`linear_damp<class_PhysicalBone3D_property_linear_damp>` is applied. See :ref:`DampMode<enum_PhysicalBone3D_DampMode>` for possible values.
  252. .. rst-class:: classref-item-separator
  253. ----
  254. .. _class_PhysicalBone3D_property_linear_velocity:
  255. .. rst-class:: classref-property
  256. :ref:`Vector3<class_Vector3>` **linear_velocity** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_PhysicalBone3D_property_linear_velocity>`
  257. .. rst-class:: classref-property-setget
  258. - |void| **set_linear_velocity**\ (\ value\: :ref:`Vector3<class_Vector3>`\ )
  259. - :ref:`Vector3<class_Vector3>` **get_linear_velocity**\ (\ )
  260. 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.
  261. .. rst-class:: classref-item-separator
  262. ----
  263. .. _class_PhysicalBone3D_property_mass:
  264. .. rst-class:: classref-property
  265. :ref:`float<class_float>` **mass** = ``1.0`` :ref:`🔗<class_PhysicalBone3D_property_mass>`
  266. .. rst-class:: classref-property-setget
  267. - |void| **set_mass**\ (\ value\: :ref:`float<class_float>`\ )
  268. - :ref:`float<class_float>` **get_mass**\ (\ )
  269. The body's mass.
  270. .. rst-class:: classref-section-separator
  271. ----
  272. .. rst-class:: classref-descriptions-group
  273. Method Descriptions
  274. -------------------
  275. .. _class_PhysicalBone3D_private_method__integrate_forces:
  276. .. rst-class:: classref-method
  277. |void| **_integrate_forces**\ (\ state\: :ref:`PhysicsDirectBodyState3D<class_PhysicsDirectBodyState3D>`\ ) |virtual| :ref:`🔗<class_PhysicalBone3D_private_method__integrate_forces>`
  278. 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.
  279. .. rst-class:: classref-item-separator
  280. ----
  281. .. _class_PhysicalBone3D_method_apply_central_impulse:
  282. .. rst-class:: classref-method
  283. |void| **apply_central_impulse**\ (\ impulse\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_PhysicalBone3D_method_apply_central_impulse>`
  284. Applies a directional impulse without affecting rotation.
  285. 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).
  286. This is equivalent to using :ref:`apply_impulse<class_PhysicalBone3D_method_apply_impulse>` at the body's center of mass.
  287. .. rst-class:: classref-item-separator
  288. ----
  289. .. _class_PhysicalBone3D_method_apply_impulse:
  290. .. rst-class:: classref-method
  291. |void| **apply_impulse**\ (\ impulse\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) :ref:`🔗<class_PhysicalBone3D_method_apply_impulse>`
  292. Applies a positioned impulse to the PhysicsBone3D.
  293. 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).
  294. \ ``position`` is the offset from the PhysicsBone3D origin in global coordinates.
  295. .. rst-class:: classref-item-separator
  296. ----
  297. .. _class_PhysicalBone3D_method_get_bone_id:
  298. .. rst-class:: classref-method
  299. :ref:`int<class_int>` **get_bone_id**\ (\ ) |const| :ref:`🔗<class_PhysicalBone3D_method_get_bone_id>`
  300. Returns the unique identifier of the PhysicsBone3D.
  301. .. rst-class:: classref-item-separator
  302. ----
  303. .. _class_PhysicalBone3D_method_get_simulate_physics:
  304. .. rst-class:: classref-method
  305. :ref:`bool<class_bool>` **get_simulate_physics**\ (\ ) :ref:`🔗<class_PhysicalBone3D_method_get_simulate_physics>`
  306. Returns ``true`` if the PhysicsBone3D is allowed to simulate physics.
  307. .. rst-class:: classref-item-separator
  308. ----
  309. .. _class_PhysicalBone3D_method_is_simulating_physics:
  310. .. rst-class:: classref-method
  311. :ref:`bool<class_bool>` **is_simulating_physics**\ (\ ) :ref:`🔗<class_PhysicalBone3D_method_is_simulating_physics>`
  312. Returns ``true`` if the PhysicsBone3D is currently simulating physics.
  313. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  314. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  315. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  316. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  317. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  318. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  319. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  320. .. |void| replace:: :abbr:`void (No return value.)`