class_lookatmodifier3d.rst 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/LookAtModifier3D.xml.
  6. .. _class_LookAtModifier3D:
  7. LookAtModifier3D
  8. ================
  9. **Inherits:** :ref:`SkeletonModifier3D<class_SkeletonModifier3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. The **LookAtModifier3D** rotates a bone to look at a target.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. This :ref:`SkeletonModifier3D<class_SkeletonModifier3D>` rotates a bone to look at a target. This is helpful for moving a character's head to look at the player, rotating a turret to look at a target, or any other case where you want to make a bone rotate towards something quickly and easily.
  15. When applying multiple **LookAtModifier3D**\ s, the **LookAtModifier3D** assigned to the parent bone must be put above the **LookAtModifier3D** assigned to the child bone in the list in order for the child bone results to be correct.
  16. .. rst-class:: classref-reftable-group
  17. Properties
  18. ----------
  19. .. table::
  20. :widths: auto
  21. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  22. | :ref:`int<class_int>` | :ref:`bone<class_LookAtModifier3D_property_bone>` | ``-1`` |
  23. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  24. | :ref:`String<class_String>` | :ref:`bone_name<class_LookAtModifier3D_property_bone_name>` | ``""`` |
  25. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  26. | :ref:`float<class_float>` | :ref:`duration<class_LookAtModifier3D_property_duration>` | ``0.0`` |
  27. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  28. | :ref:`EaseType<enum_Tween_EaseType>` | :ref:`ease_type<class_LookAtModifier3D_property_ease_type>` | ``0`` |
  29. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  30. | :ref:`BoneAxis<enum_SkeletonModifier3D_BoneAxis>` | :ref:`forward_axis<class_LookAtModifier3D_property_forward_axis>` | ``4`` |
  31. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  32. | :ref:`int<class_int>` | :ref:`origin_bone<class_LookAtModifier3D_property_origin_bone>` | |
  33. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  34. | :ref:`String<class_String>` | :ref:`origin_bone_name<class_LookAtModifier3D_property_origin_bone_name>` | |
  35. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  36. | :ref:`NodePath<class_NodePath>` | :ref:`origin_external_node<class_LookAtModifier3D_property_origin_external_node>` | |
  37. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  38. | :ref:`OriginFrom<enum_LookAtModifier3D_OriginFrom>` | :ref:`origin_from<class_LookAtModifier3D_property_origin_from>` | ``0`` |
  39. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  40. | :ref:`Vector3<class_Vector3>` | :ref:`origin_offset<class_LookAtModifier3D_property_origin_offset>` | ``Vector3(0, 0, 0)`` |
  41. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  42. | :ref:`float<class_float>` | :ref:`origin_safe_margin<class_LookAtModifier3D_property_origin_safe_margin>` | ``0.1`` |
  43. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  44. | :ref:`float<class_float>` | :ref:`primary_damp_threshold<class_LookAtModifier3D_property_primary_damp_threshold>` | |
  45. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  46. | :ref:`float<class_float>` | :ref:`primary_limit_angle<class_LookAtModifier3D_property_primary_limit_angle>` | |
  47. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  48. | :ref:`float<class_float>` | :ref:`primary_negative_damp_threshold<class_LookAtModifier3D_property_primary_negative_damp_threshold>` | |
  49. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  50. | :ref:`float<class_float>` | :ref:`primary_negative_limit_angle<class_LookAtModifier3D_property_primary_negative_limit_angle>` | |
  51. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  52. | :ref:`float<class_float>` | :ref:`primary_positive_damp_threshold<class_LookAtModifier3D_property_primary_positive_damp_threshold>` | |
  53. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  54. | :ref:`float<class_float>` | :ref:`primary_positive_limit_angle<class_LookAtModifier3D_property_primary_positive_limit_angle>` | |
  55. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  56. | :ref:`Axis<enum_Vector3_Axis>` | :ref:`primary_rotation_axis<class_LookAtModifier3D_property_primary_rotation_axis>` | ``1`` |
  57. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  58. | :ref:`float<class_float>` | :ref:`secondary_damp_threshold<class_LookAtModifier3D_property_secondary_damp_threshold>` | |
  59. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  60. | :ref:`float<class_float>` | :ref:`secondary_limit_angle<class_LookAtModifier3D_property_secondary_limit_angle>` | |
  61. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  62. | :ref:`float<class_float>` | :ref:`secondary_negative_damp_threshold<class_LookAtModifier3D_property_secondary_negative_damp_threshold>` | |
  63. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  64. | :ref:`float<class_float>` | :ref:`secondary_negative_limit_angle<class_LookAtModifier3D_property_secondary_negative_limit_angle>` | |
  65. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  66. | :ref:`float<class_float>` | :ref:`secondary_positive_damp_threshold<class_LookAtModifier3D_property_secondary_positive_damp_threshold>` | |
  67. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  68. | :ref:`float<class_float>` | :ref:`secondary_positive_limit_angle<class_LookAtModifier3D_property_secondary_positive_limit_angle>` | |
  69. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  70. | :ref:`bool<class_bool>` | :ref:`symmetry_limitation<class_LookAtModifier3D_property_symmetry_limitation>` | |
  71. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  72. | :ref:`NodePath<class_NodePath>` | :ref:`target_node<class_LookAtModifier3D_property_target_node>` | ``NodePath("")`` |
  73. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  74. | :ref:`TransitionType<enum_Tween_TransitionType>` | :ref:`transition_type<class_LookAtModifier3D_property_transition_type>` | ``0`` |
  75. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  76. | :ref:`bool<class_bool>` | :ref:`use_angle_limitation<class_LookAtModifier3D_property_use_angle_limitation>` | ``false`` |
  77. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  78. | :ref:`bool<class_bool>` | :ref:`use_secondary_rotation<class_LookAtModifier3D_property_use_secondary_rotation>` | ``true`` |
  79. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  80. .. rst-class:: classref-reftable-group
  81. Methods
  82. -------
  83. .. table::
  84. :widths: auto
  85. +---------------------------+-------------------------------------------------------------------------------------------------------------+
  86. | :ref:`float<class_float>` | :ref:`get_interpolation_remaining<class_LookAtModifier3D_method_get_interpolation_remaining>`\ (\ ) |const| |
  87. +---------------------------+-------------------------------------------------------------------------------------------------------------+
  88. | :ref:`bool<class_bool>` | :ref:`is_interpolating<class_LookAtModifier3D_method_is_interpolating>`\ (\ ) |const| |
  89. +---------------------------+-------------------------------------------------------------------------------------------------------------+
  90. | :ref:`bool<class_bool>` | :ref:`is_target_within_limitation<class_LookAtModifier3D_method_is_target_within_limitation>`\ (\ ) |const| |
  91. +---------------------------+-------------------------------------------------------------------------------------------------------------+
  92. .. rst-class:: classref-section-separator
  93. ----
  94. .. rst-class:: classref-descriptions-group
  95. Enumerations
  96. ------------
  97. .. _enum_LookAtModifier3D_OriginFrom:
  98. .. rst-class:: classref-enumeration
  99. enum **OriginFrom**: :ref:`๐Ÿ”—<enum_LookAtModifier3D_OriginFrom>`
  100. .. _class_LookAtModifier3D_constant_ORIGIN_FROM_SELF:
  101. .. rst-class:: classref-enumeration-constant
  102. :ref:`OriginFrom<enum_LookAtModifier3D_OriginFrom>` **ORIGIN_FROM_SELF** = ``0``
  103. The bone rest position of the bone specified in :ref:`bone<class_LookAtModifier3D_property_bone>` is used as origin.
  104. .. _class_LookAtModifier3D_constant_ORIGIN_FROM_SPECIFIC_BONE:
  105. .. rst-class:: classref-enumeration-constant
  106. :ref:`OriginFrom<enum_LookAtModifier3D_OriginFrom>` **ORIGIN_FROM_SPECIFIC_BONE** = ``1``
  107. The bone global pose position of the bone specified in :ref:`origin_bone<class_LookAtModifier3D_property_origin_bone>` is used as origin.
  108. \ **Note:** It is recommended that you select only the parent bone unless you are familiar with the bone processing process. The specified bone pose at the time the **LookAtModifier3D** is processed is used as a reference. In other words, if you specify a child bone and the **LookAtModifier3D** causes the child bone to move, the rendered result and direction will not match.
  109. .. _class_LookAtModifier3D_constant_ORIGIN_FROM_EXTERNAL_NODE:
  110. .. rst-class:: classref-enumeration-constant
  111. :ref:`OriginFrom<enum_LookAtModifier3D_OriginFrom>` **ORIGIN_FROM_EXTERNAL_NODE** = ``2``
  112. The global position of the :ref:`Node3D<class_Node3D>` specified in :ref:`origin_external_node<class_LookAtModifier3D_property_origin_external_node>` is used as origin.
  113. \ **Note:** Same as :ref:`ORIGIN_FROM_SPECIFIC_BONE<class_LookAtModifier3D_constant_ORIGIN_FROM_SPECIFIC_BONE>`, when specifying a :ref:`BoneAttachment3D<class_BoneAttachment3D>` with a child bone assigned, the rendered result and direction will not match.
  114. .. rst-class:: classref-section-separator
  115. ----
  116. .. rst-class:: classref-descriptions-group
  117. Property Descriptions
  118. ---------------------
  119. .. _class_LookAtModifier3D_property_bone:
  120. .. rst-class:: classref-property
  121. :ref:`int<class_int>` **bone** = ``-1`` :ref:`๐Ÿ”—<class_LookAtModifier3D_property_bone>`
  122. .. rst-class:: classref-property-setget
  123. - |void| **set_bone**\ (\ value\: :ref:`int<class_int>`\ )
  124. - :ref:`int<class_int>` **get_bone**\ (\ )
  125. Index of the :ref:`bone_name<class_LookAtModifier3D_property_bone_name>` in the parent :ref:`Skeleton3D<class_Skeleton3D>`.
  126. .. rst-class:: classref-item-separator
  127. ----
  128. .. _class_LookAtModifier3D_property_bone_name:
  129. .. rst-class:: classref-property
  130. :ref:`String<class_String>` **bone_name** = ``""`` :ref:`๐Ÿ”—<class_LookAtModifier3D_property_bone_name>`
  131. .. rst-class:: classref-property-setget
  132. - |void| **set_bone_name**\ (\ value\: :ref:`String<class_String>`\ )
  133. - :ref:`String<class_String>` **get_bone_name**\ (\ )
  134. The bone name of the :ref:`Skeleton3D<class_Skeleton3D>` that the modification will operate on.
  135. .. rst-class:: classref-item-separator
  136. ----
  137. .. _class_LookAtModifier3D_property_duration:
  138. .. rst-class:: classref-property
  139. :ref:`float<class_float>` **duration** = ``0.0`` :ref:`๐Ÿ”—<class_LookAtModifier3D_property_duration>`
  140. .. rst-class:: classref-property-setget
  141. - |void| **set_duration**\ (\ value\: :ref:`float<class_float>`\ )
  142. - :ref:`float<class_float>` **get_duration**\ (\ )
  143. The duration of the time-based interpolation. Interpolation is triggered at the following cases:
  144. - When the target node is changed
  145. - When an axis is flipped due to angle limitation
  146. \ **Note:** The flipping occurs when the target is outside the angle limitation and the internally computed secondary rotation axis of the forward vector is flipped. Visually, it occurs when the target is outside the angle limitation and crosses the plane of the :ref:`forward_axis<class_LookAtModifier3D_property_forward_axis>` and :ref:`primary_rotation_axis<class_LookAtModifier3D_property_primary_rotation_axis>`.
  147. .. rst-class:: classref-item-separator
  148. ----
  149. .. _class_LookAtModifier3D_property_ease_type:
  150. .. rst-class:: classref-property
  151. :ref:`EaseType<enum_Tween_EaseType>` **ease_type** = ``0`` :ref:`๐Ÿ”—<class_LookAtModifier3D_property_ease_type>`
  152. .. rst-class:: classref-property-setget
  153. - |void| **set_ease_type**\ (\ value\: :ref:`EaseType<enum_Tween_EaseType>`\ )
  154. - :ref:`EaseType<enum_Tween_EaseType>` **get_ease_type**\ (\ )
  155. The ease type of the time-based interpolation. See also :ref:`EaseType<enum_Tween_EaseType>`.
  156. .. rst-class:: classref-item-separator
  157. ----
  158. .. _class_LookAtModifier3D_property_forward_axis:
  159. .. rst-class:: classref-property
  160. :ref:`BoneAxis<enum_SkeletonModifier3D_BoneAxis>` **forward_axis** = ``4`` :ref:`๐Ÿ”—<class_LookAtModifier3D_property_forward_axis>`
  161. .. rst-class:: classref-property-setget
  162. - |void| **set_forward_axis**\ (\ value\: :ref:`BoneAxis<enum_SkeletonModifier3D_BoneAxis>`\ )
  163. - :ref:`BoneAxis<enum_SkeletonModifier3D_BoneAxis>` **get_forward_axis**\ (\ )
  164. The forward axis of the bone. This :ref:`SkeletonModifier3D<class_SkeletonModifier3D>` modifies the bone so that this axis points toward the :ref:`target_node<class_LookAtModifier3D_property_target_node>`.
  165. .. rst-class:: classref-item-separator
  166. ----
  167. .. _class_LookAtModifier3D_property_origin_bone:
  168. .. rst-class:: classref-property
  169. :ref:`int<class_int>` **origin_bone** :ref:`๐Ÿ”—<class_LookAtModifier3D_property_origin_bone>`
  170. .. rst-class:: classref-property-setget
  171. - |void| **set_origin_bone**\ (\ value\: :ref:`int<class_int>`\ )
  172. - :ref:`int<class_int>` **get_origin_bone**\ (\ )
  173. Index of the :ref:`origin_bone_name<class_LookAtModifier3D_property_origin_bone_name>` in the parent :ref:`Skeleton3D<class_Skeleton3D>`.
  174. .. rst-class:: classref-item-separator
  175. ----
  176. .. _class_LookAtModifier3D_property_origin_bone_name:
  177. .. rst-class:: classref-property
  178. :ref:`String<class_String>` **origin_bone_name** :ref:`๐Ÿ”—<class_LookAtModifier3D_property_origin_bone_name>`
  179. .. rst-class:: classref-property-setget
  180. - |void| **set_origin_bone_name**\ (\ value\: :ref:`String<class_String>`\ )
  181. - :ref:`String<class_String>` **get_origin_bone_name**\ (\ )
  182. If :ref:`origin_from<class_LookAtModifier3D_property_origin_from>` is :ref:`ORIGIN_FROM_SPECIFIC_BONE<class_LookAtModifier3D_constant_ORIGIN_FROM_SPECIFIC_BONE>`, the bone global pose position specified for this is used as origin.
  183. .. rst-class:: classref-item-separator
  184. ----
  185. .. _class_LookAtModifier3D_property_origin_external_node:
  186. .. rst-class:: classref-property
  187. :ref:`NodePath<class_NodePath>` **origin_external_node** :ref:`๐Ÿ”—<class_LookAtModifier3D_property_origin_external_node>`
  188. .. rst-class:: classref-property-setget
  189. - |void| **set_origin_external_node**\ (\ value\: :ref:`NodePath<class_NodePath>`\ )
  190. - :ref:`NodePath<class_NodePath>` **get_origin_external_node**\ (\ )
  191. If :ref:`origin_from<class_LookAtModifier3D_property_origin_from>` is :ref:`ORIGIN_FROM_EXTERNAL_NODE<class_LookAtModifier3D_constant_ORIGIN_FROM_EXTERNAL_NODE>`, the global position of the :ref:`Node3D<class_Node3D>` specified for this is used as origin.
  192. .. rst-class:: classref-item-separator
  193. ----
  194. .. _class_LookAtModifier3D_property_origin_from:
  195. .. rst-class:: classref-property
  196. :ref:`OriginFrom<enum_LookAtModifier3D_OriginFrom>` **origin_from** = ``0`` :ref:`๐Ÿ”—<class_LookAtModifier3D_property_origin_from>`
  197. .. rst-class:: classref-property-setget
  198. - |void| **set_origin_from**\ (\ value\: :ref:`OriginFrom<enum_LookAtModifier3D_OriginFrom>`\ )
  199. - :ref:`OriginFrom<enum_LookAtModifier3D_OriginFrom>` **get_origin_from**\ (\ )
  200. This value determines from what origin is retrieved for use in the calculation of the forward vector.
  201. .. rst-class:: classref-item-separator
  202. ----
  203. .. _class_LookAtModifier3D_property_origin_offset:
  204. .. rst-class:: classref-property
  205. :ref:`Vector3<class_Vector3>` **origin_offset** = ``Vector3(0, 0, 0)`` :ref:`๐Ÿ”—<class_LookAtModifier3D_property_origin_offset>`
  206. .. rst-class:: classref-property-setget
  207. - |void| **set_origin_offset**\ (\ value\: :ref:`Vector3<class_Vector3>`\ )
  208. - :ref:`Vector3<class_Vector3>` **get_origin_offset**\ (\ )
  209. The offset of the bone pose origin. Matching the origins by offset is useful for cases where multiple bones must always face the same direction, such as the eyes.
  210. \ **Note:** This value indicates the local position of the object set in :ref:`origin_from<class_LookAtModifier3D_property_origin_from>`.
  211. .. rst-class:: classref-item-separator
  212. ----
  213. .. _class_LookAtModifier3D_property_origin_safe_margin:
  214. .. rst-class:: classref-property
  215. :ref:`float<class_float>` **origin_safe_margin** = ``0.1`` :ref:`๐Ÿ”—<class_LookAtModifier3D_property_origin_safe_margin>`
  216. .. rst-class:: classref-property-setget
  217. - |void| **set_origin_safe_margin**\ (\ value\: :ref:`float<class_float>`\ )
  218. - :ref:`float<class_float>` **get_origin_safe_margin**\ (\ )
  219. If the target passes through too close to the origin than this value, time-based interpolation is used even if the target is within the angular limitations, to prevent the angular velocity from becoming too high.
  220. .. rst-class:: classref-item-separator
  221. ----
  222. .. _class_LookAtModifier3D_property_primary_damp_threshold:
  223. .. rst-class:: classref-property
  224. :ref:`float<class_float>` **primary_damp_threshold** :ref:`๐Ÿ”—<class_LookAtModifier3D_property_primary_damp_threshold>`
  225. .. rst-class:: classref-property-setget
  226. - |void| **set_primary_damp_threshold**\ (\ value\: :ref:`float<class_float>`\ )
  227. - :ref:`float<class_float>` **get_primary_damp_threshold**\ (\ )
  228. The threshold to start damping for :ref:`primary_limit_angle<class_LookAtModifier3D_property_primary_limit_angle>`. It provides non-linear (b-spline) interpolation, let it feel more resistance the more it rotate to the edge limit. This is useful for simulating the limits of human motion.
  229. If ``1.0``, no damping is performed. If ``0.0``, damping is always performed.
  230. .. rst-class:: classref-item-separator
  231. ----
  232. .. _class_LookAtModifier3D_property_primary_limit_angle:
  233. .. rst-class:: classref-property
  234. :ref:`float<class_float>` **primary_limit_angle** :ref:`๐Ÿ”—<class_LookAtModifier3D_property_primary_limit_angle>`
  235. .. rst-class:: classref-property-setget
  236. - |void| **set_primary_limit_angle**\ (\ value\: :ref:`float<class_float>`\ )
  237. - :ref:`float<class_float>` **get_primary_limit_angle**\ (\ )
  238. The limit angle of the primary rotation when :ref:`symmetry_limitation<class_LookAtModifier3D_property_symmetry_limitation>` is ``true``.
  239. .. rst-class:: classref-item-separator
  240. ----
  241. .. _class_LookAtModifier3D_property_primary_negative_damp_threshold:
  242. .. rst-class:: classref-property
  243. :ref:`float<class_float>` **primary_negative_damp_threshold** :ref:`๐Ÿ”—<class_LookAtModifier3D_property_primary_negative_damp_threshold>`
  244. .. rst-class:: classref-property-setget
  245. - |void| **set_primary_negative_damp_threshold**\ (\ value\: :ref:`float<class_float>`\ )
  246. - :ref:`float<class_float>` **get_primary_negative_damp_threshold**\ (\ )
  247. The threshold to start damping for :ref:`primary_negative_limit_angle<class_LookAtModifier3D_property_primary_negative_limit_angle>`.
  248. .. rst-class:: classref-item-separator
  249. ----
  250. .. _class_LookAtModifier3D_property_primary_negative_limit_angle:
  251. .. rst-class:: classref-property
  252. :ref:`float<class_float>` **primary_negative_limit_angle** :ref:`๐Ÿ”—<class_LookAtModifier3D_property_primary_negative_limit_angle>`
  253. .. rst-class:: classref-property-setget
  254. - |void| **set_primary_negative_limit_angle**\ (\ value\: :ref:`float<class_float>`\ )
  255. - :ref:`float<class_float>` **get_primary_negative_limit_angle**\ (\ )
  256. The limit angle of negative side of the primary rotation when :ref:`symmetry_limitation<class_LookAtModifier3D_property_symmetry_limitation>` is ``false``.
  257. .. rst-class:: classref-item-separator
  258. ----
  259. .. _class_LookAtModifier3D_property_primary_positive_damp_threshold:
  260. .. rst-class:: classref-property
  261. :ref:`float<class_float>` **primary_positive_damp_threshold** :ref:`๐Ÿ”—<class_LookAtModifier3D_property_primary_positive_damp_threshold>`
  262. .. rst-class:: classref-property-setget
  263. - |void| **set_primary_positive_damp_threshold**\ (\ value\: :ref:`float<class_float>`\ )
  264. - :ref:`float<class_float>` **get_primary_positive_damp_threshold**\ (\ )
  265. The threshold to start damping for :ref:`primary_positive_limit_angle<class_LookAtModifier3D_property_primary_positive_limit_angle>`.
  266. .. rst-class:: classref-item-separator
  267. ----
  268. .. _class_LookAtModifier3D_property_primary_positive_limit_angle:
  269. .. rst-class:: classref-property
  270. :ref:`float<class_float>` **primary_positive_limit_angle** :ref:`๐Ÿ”—<class_LookAtModifier3D_property_primary_positive_limit_angle>`
  271. .. rst-class:: classref-property-setget
  272. - |void| **set_primary_positive_limit_angle**\ (\ value\: :ref:`float<class_float>`\ )
  273. - :ref:`float<class_float>` **get_primary_positive_limit_angle**\ (\ )
  274. The limit angle of positive side of the primary rotation when :ref:`symmetry_limitation<class_LookAtModifier3D_property_symmetry_limitation>` is ``false``.
  275. .. rst-class:: classref-item-separator
  276. ----
  277. .. _class_LookAtModifier3D_property_primary_rotation_axis:
  278. .. rst-class:: classref-property
  279. :ref:`Axis<enum_Vector3_Axis>` **primary_rotation_axis** = ``1`` :ref:`๐Ÿ”—<class_LookAtModifier3D_property_primary_rotation_axis>`
  280. .. rst-class:: classref-property-setget
  281. - |void| **set_primary_rotation_axis**\ (\ value\: :ref:`Axis<enum_Vector3_Axis>`\ )
  282. - :ref:`Axis<enum_Vector3_Axis>` **get_primary_rotation_axis**\ (\ )
  283. The axis of the first rotation. This :ref:`SkeletonModifier3D<class_SkeletonModifier3D>` works by compositing the rotation by Euler angles to prevent to rotate the :ref:`forward_axis<class_LookAtModifier3D_property_forward_axis>`.
  284. .. rst-class:: classref-item-separator
  285. ----
  286. .. _class_LookAtModifier3D_property_secondary_damp_threshold:
  287. .. rst-class:: classref-property
  288. :ref:`float<class_float>` **secondary_damp_threshold** :ref:`๐Ÿ”—<class_LookAtModifier3D_property_secondary_damp_threshold>`
  289. .. rst-class:: classref-property-setget
  290. - |void| **set_secondary_damp_threshold**\ (\ value\: :ref:`float<class_float>`\ )
  291. - :ref:`float<class_float>` **get_secondary_damp_threshold**\ (\ )
  292. The threshold to start damping for :ref:`secondary_limit_angle<class_LookAtModifier3D_property_secondary_limit_angle>`.
  293. .. rst-class:: classref-item-separator
  294. ----
  295. .. _class_LookAtModifier3D_property_secondary_limit_angle:
  296. .. rst-class:: classref-property
  297. :ref:`float<class_float>` **secondary_limit_angle** :ref:`๐Ÿ”—<class_LookAtModifier3D_property_secondary_limit_angle>`
  298. .. rst-class:: classref-property-setget
  299. - |void| **set_secondary_limit_angle**\ (\ value\: :ref:`float<class_float>`\ )
  300. - :ref:`float<class_float>` **get_secondary_limit_angle**\ (\ )
  301. The limit angle of the secondary rotation when :ref:`symmetry_limitation<class_LookAtModifier3D_property_symmetry_limitation>` is ``true``.
  302. .. rst-class:: classref-item-separator
  303. ----
  304. .. _class_LookAtModifier3D_property_secondary_negative_damp_threshold:
  305. .. rst-class:: classref-property
  306. :ref:`float<class_float>` **secondary_negative_damp_threshold** :ref:`๐Ÿ”—<class_LookAtModifier3D_property_secondary_negative_damp_threshold>`
  307. .. rst-class:: classref-property-setget
  308. - |void| **set_secondary_negative_damp_threshold**\ (\ value\: :ref:`float<class_float>`\ )
  309. - :ref:`float<class_float>` **get_secondary_negative_damp_threshold**\ (\ )
  310. The threshold to start damping for :ref:`secondary_negative_limit_angle<class_LookAtModifier3D_property_secondary_negative_limit_angle>`.
  311. .. rst-class:: classref-item-separator
  312. ----
  313. .. _class_LookAtModifier3D_property_secondary_negative_limit_angle:
  314. .. rst-class:: classref-property
  315. :ref:`float<class_float>` **secondary_negative_limit_angle** :ref:`๐Ÿ”—<class_LookAtModifier3D_property_secondary_negative_limit_angle>`
  316. .. rst-class:: classref-property-setget
  317. - |void| **set_secondary_negative_limit_angle**\ (\ value\: :ref:`float<class_float>`\ )
  318. - :ref:`float<class_float>` **get_secondary_negative_limit_angle**\ (\ )
  319. The limit angle of negative side of the secondary rotation when :ref:`symmetry_limitation<class_LookAtModifier3D_property_symmetry_limitation>` is ``false``.
  320. .. rst-class:: classref-item-separator
  321. ----
  322. .. _class_LookAtModifier3D_property_secondary_positive_damp_threshold:
  323. .. rst-class:: classref-property
  324. :ref:`float<class_float>` **secondary_positive_damp_threshold** :ref:`๐Ÿ”—<class_LookAtModifier3D_property_secondary_positive_damp_threshold>`
  325. .. rst-class:: classref-property-setget
  326. - |void| **set_secondary_positive_damp_threshold**\ (\ value\: :ref:`float<class_float>`\ )
  327. - :ref:`float<class_float>` **get_secondary_positive_damp_threshold**\ (\ )
  328. The threshold to start damping for :ref:`secondary_positive_limit_angle<class_LookAtModifier3D_property_secondary_positive_limit_angle>`.
  329. .. rst-class:: classref-item-separator
  330. ----
  331. .. _class_LookAtModifier3D_property_secondary_positive_limit_angle:
  332. .. rst-class:: classref-property
  333. :ref:`float<class_float>` **secondary_positive_limit_angle** :ref:`๐Ÿ”—<class_LookAtModifier3D_property_secondary_positive_limit_angle>`
  334. .. rst-class:: classref-property-setget
  335. - |void| **set_secondary_positive_limit_angle**\ (\ value\: :ref:`float<class_float>`\ )
  336. - :ref:`float<class_float>` **get_secondary_positive_limit_angle**\ (\ )
  337. The limit angle of positive side of the secondary rotation when :ref:`symmetry_limitation<class_LookAtModifier3D_property_symmetry_limitation>` is ``false``.
  338. .. rst-class:: classref-item-separator
  339. ----
  340. .. _class_LookAtModifier3D_property_symmetry_limitation:
  341. .. rst-class:: classref-property
  342. :ref:`bool<class_bool>` **symmetry_limitation** :ref:`๐Ÿ”—<class_LookAtModifier3D_property_symmetry_limitation>`
  343. .. rst-class:: classref-property-setget
  344. - |void| **set_symmetry_limitation**\ (\ value\: :ref:`bool<class_bool>`\ )
  345. - :ref:`bool<class_bool>` **is_limitation_symmetry**\ (\ )
  346. If ``true``, the limitations are spread from the bone symmetrically.
  347. If ``false``, the limitation can be specified separately for each side of the bone rest.
  348. .. rst-class:: classref-item-separator
  349. ----
  350. .. _class_LookAtModifier3D_property_target_node:
  351. .. rst-class:: classref-property
  352. :ref:`NodePath<class_NodePath>` **target_node** = ``NodePath("")`` :ref:`๐Ÿ”—<class_LookAtModifier3D_property_target_node>`
  353. .. rst-class:: classref-property-setget
  354. - |void| **set_target_node**\ (\ value\: :ref:`NodePath<class_NodePath>`\ )
  355. - :ref:`NodePath<class_NodePath>` **get_target_node**\ (\ )
  356. The :ref:`NodePath<class_NodePath>` to the node that is the target for the look at modification. This node is what the modification will rotate the bone to.
  357. .. rst-class:: classref-item-separator
  358. ----
  359. .. _class_LookAtModifier3D_property_transition_type:
  360. .. rst-class:: classref-property
  361. :ref:`TransitionType<enum_Tween_TransitionType>` **transition_type** = ``0`` :ref:`๐Ÿ”—<class_LookAtModifier3D_property_transition_type>`
  362. .. rst-class:: classref-property-setget
  363. - |void| **set_transition_type**\ (\ value\: :ref:`TransitionType<enum_Tween_TransitionType>`\ )
  364. - :ref:`TransitionType<enum_Tween_TransitionType>` **get_transition_type**\ (\ )
  365. The transition type of the time-based interpolation. See also :ref:`TransitionType<enum_Tween_TransitionType>`.
  366. .. rst-class:: classref-item-separator
  367. ----
  368. .. _class_LookAtModifier3D_property_use_angle_limitation:
  369. .. rst-class:: classref-property
  370. :ref:`bool<class_bool>` **use_angle_limitation** = ``false`` :ref:`๐Ÿ”—<class_LookAtModifier3D_property_use_angle_limitation>`
  371. .. rst-class:: classref-property-setget
  372. - |void| **set_use_angle_limitation**\ (\ value\: :ref:`bool<class_bool>`\ )
  373. - :ref:`bool<class_bool>` **is_using_angle_limitation**\ (\ )
  374. If ``true``, limits the degree of rotation. This helps prevent the character's neck from rotating 360 degrees.
  375. \ **Note:** As with :ref:`AnimationTree<class_AnimationTree>` blending, interpolation is provided that favors :ref:`Skeleton3D.get_bone_rest()<class_Skeleton3D_method_get_bone_rest>`. This means that interpolation does not select the shortest path in some cases.
  376. \ **Note:** Some :ref:`transition_type<class_LookAtModifier3D_property_transition_type>` may exceed the limitations (e.g. `Back`, `Elastic`, and `Spring`). If interpolation occurs while overshooting the limitations, the result might possibly not respect the bone rest.
  377. .. rst-class:: classref-item-separator
  378. ----
  379. .. _class_LookAtModifier3D_property_use_secondary_rotation:
  380. .. rst-class:: classref-property
  381. :ref:`bool<class_bool>` **use_secondary_rotation** = ``true`` :ref:`๐Ÿ”—<class_LookAtModifier3D_property_use_secondary_rotation>`
  382. .. rst-class:: classref-property-setget
  383. - |void| **set_use_secondary_rotation**\ (\ value\: :ref:`bool<class_bool>`\ )
  384. - :ref:`bool<class_bool>` **is_using_secondary_rotation**\ (\ )
  385. If ``true``, provides rotation by two axes.
  386. .. rst-class:: classref-section-separator
  387. ----
  388. .. rst-class:: classref-descriptions-group
  389. Method Descriptions
  390. -------------------
  391. .. _class_LookAtModifier3D_method_get_interpolation_remaining:
  392. .. rst-class:: classref-method
  393. :ref:`float<class_float>` **get_interpolation_remaining**\ (\ ) |const| :ref:`๐Ÿ”—<class_LookAtModifier3D_method_get_interpolation_remaining>`
  394. Returns the remaining seconds of the time-based interpolation.
  395. .. rst-class:: classref-item-separator
  396. ----
  397. .. _class_LookAtModifier3D_method_is_interpolating:
  398. .. rst-class:: classref-method
  399. :ref:`bool<class_bool>` **is_interpolating**\ (\ ) |const| :ref:`๐Ÿ”—<class_LookAtModifier3D_method_is_interpolating>`
  400. Returns whether the time-based interpolation is running or not. If ``true``, it is equivalent to :ref:`get_interpolation_remaining()<class_LookAtModifier3D_method_get_interpolation_remaining>` being ``0``.
  401. This is useful to determine whether a **LookAtModifier3D** can be removed safely.
  402. .. rst-class:: classref-item-separator
  403. ----
  404. .. _class_LookAtModifier3D_method_is_target_within_limitation:
  405. .. rst-class:: classref-method
  406. :ref:`bool<class_bool>` **is_target_within_limitation**\ (\ ) |const| :ref:`๐Ÿ”—<class_LookAtModifier3D_method_is_target_within_limitation>`
  407. Returns whether the target is within the angle limitations. It is useful for unsetting the :ref:`target_node<class_LookAtModifier3D_property_target_node>` when the target is outside of the angle limitations.
  408. \ **Note:** The value is updated after :ref:`SkeletonModifier3D._process_modification()<class_SkeletonModifier3D_private_method__process_modification>`. To retrieve this value correctly, we recommend using the signal :ref:`SkeletonModifier3D.modification_processed<class_SkeletonModifier3D_signal_modification_processed>`.
  409. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  410. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  411. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  412. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  413. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  414. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  415. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  416. .. |void| replace:: :abbr:`void (No return value.)`