class_lookatmodifier3d.rst 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739
  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 :ref:`SkeletonModifier3D<class_SkeletonModifier3D>` rotates a bone to look a target.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. This :ref:`SkeletonModifier3D<class_SkeletonModifier3D>` rotates a bone to look a target. This is helpful for moving 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>` | ``0`` |
  23. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  24. | :ref:`float<class_float>` | :ref:`duration<class_LookAtModifier3D_property_duration>` | ``0.0`` |
  25. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  26. | :ref:`EaseType<enum_Tween_EaseType>` | :ref:`ease_type<class_LookAtModifier3D_property_ease_type>` | ``0`` |
  27. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  28. | :ref:`BoneAxis<enum_LookAtModifier3D_BoneAxis>` | :ref:`forward_axis<class_LookAtModifier3D_property_forward_axis>` | ``4`` |
  29. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  30. | :ref:`int<class_int>` | :ref:`origin_bone<class_LookAtModifier3D_property_origin_bone>` | |
  31. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  32. | :ref:`NodePath<class_NodePath>` | :ref:`origin_external_node<class_LookAtModifier3D_property_origin_external_node>` | |
  33. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  34. | :ref:`OriginFrom<enum_LookAtModifier3D_OriginFrom>` | :ref:`origin_from<class_LookAtModifier3D_property_origin_from>` | ``0`` |
  35. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  36. | :ref:`Vector3<class_Vector3>` | :ref:`origin_offset<class_LookAtModifier3D_property_origin_offset>` | ``Vector3(0, 0, 0)`` |
  37. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  38. | :ref:`float<class_float>` | :ref:`origin_safe_margin<class_LookAtModifier3D_property_origin_safe_margin>` | ``0.1`` |
  39. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  40. | :ref:`float<class_float>` | :ref:`primary_damp_threshold<class_LookAtModifier3D_property_primary_damp_threshold>` | |
  41. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  42. | :ref:`float<class_float>` | :ref:`primary_limit_angle<class_LookAtModifier3D_property_primary_limit_angle>` | |
  43. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  44. | :ref:`float<class_float>` | :ref:`primary_negative_damp_threshold<class_LookAtModifier3D_property_primary_negative_damp_threshold>` | |
  45. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  46. | :ref:`float<class_float>` | :ref:`primary_negative_limit_angle<class_LookAtModifier3D_property_primary_negative_limit_angle>` | |
  47. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  48. | :ref:`float<class_float>` | :ref:`primary_positive_damp_threshold<class_LookAtModifier3D_property_primary_positive_damp_threshold>` | |
  49. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  50. | :ref:`float<class_float>` | :ref:`primary_positive_limit_angle<class_LookAtModifier3D_property_primary_positive_limit_angle>` | |
  51. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  52. | Vector3.Axis | :ref:`primary_rotation_axis<class_LookAtModifier3D_property_primary_rotation_axis>` | ``1`` |
  53. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  54. | :ref:`float<class_float>` | :ref:`secondary_damp_threshold<class_LookAtModifier3D_property_secondary_damp_threshold>` | |
  55. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  56. | :ref:`float<class_float>` | :ref:`secondary_limit_angle<class_LookAtModifier3D_property_secondary_limit_angle>` | |
  57. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  58. | :ref:`float<class_float>` | :ref:`secondary_negative_damp_threshold<class_LookAtModifier3D_property_secondary_negative_damp_threshold>` | |
  59. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  60. | :ref:`float<class_float>` | :ref:`secondary_negative_limit_angle<class_LookAtModifier3D_property_secondary_negative_limit_angle>` | |
  61. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  62. | :ref:`float<class_float>` | :ref:`secondary_positive_damp_threshold<class_LookAtModifier3D_property_secondary_positive_damp_threshold>` | |
  63. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  64. | :ref:`float<class_float>` | :ref:`secondary_positive_limit_angle<class_LookAtModifier3D_property_secondary_positive_limit_angle>` | |
  65. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  66. | :ref:`bool<class_bool>` | :ref:`symmetry_limitation<class_LookAtModifier3D_property_symmetry_limitation>` | |
  67. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  68. | :ref:`NodePath<class_NodePath>` | :ref:`target_node<class_LookAtModifier3D_property_target_node>` | ``NodePath("")`` |
  69. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  70. | :ref:`TransitionType<enum_Tween_TransitionType>` | :ref:`transition_type<class_LookAtModifier3D_property_transition_type>` | ``0`` |
  71. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  72. | :ref:`bool<class_bool>` | :ref:`use_angle_limitation<class_LookAtModifier3D_property_use_angle_limitation>` | ``false`` |
  73. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  74. | :ref:`bool<class_bool>` | :ref:`use_secondary_rotation<class_LookAtModifier3D_property_use_secondary_rotation>` | ``true`` |
  75. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+----------------------+
  76. .. rst-class:: classref-reftable-group
  77. Methods
  78. -------
  79. .. table::
  80. :widths: auto
  81. +---------------------------+-------------------------------------------------------------------------------------------------------------+
  82. | :ref:`float<class_float>` | :ref:`get_interpolation_remaining<class_LookAtModifier3D_method_get_interpolation_remaining>`\ (\ ) |const| |
  83. +---------------------------+-------------------------------------------------------------------------------------------------------------+
  84. | :ref:`bool<class_bool>` | :ref:`is_interpolating<class_LookAtModifier3D_method_is_interpolating>`\ (\ ) |const| |
  85. +---------------------------+-------------------------------------------------------------------------------------------------------------+
  86. | :ref:`bool<class_bool>` | :ref:`is_target_within_limitation<class_LookAtModifier3D_method_is_target_within_limitation>`\ (\ ) |const| |
  87. +---------------------------+-------------------------------------------------------------------------------------------------------------+
  88. .. rst-class:: classref-section-separator
  89. ----
  90. .. rst-class:: classref-descriptions-group
  91. Enumerations
  92. ------------
  93. .. _enum_LookAtModifier3D_BoneAxis:
  94. .. rst-class:: classref-enumeration
  95. enum **BoneAxis**: :ref:`🔗<enum_LookAtModifier3D_BoneAxis>`
  96. .. _class_LookAtModifier3D_constant_BONE_AXIS_PLUS_X:
  97. .. rst-class:: classref-enumeration-constant
  98. :ref:`BoneAxis<enum_LookAtModifier3D_BoneAxis>` **BONE_AXIS_PLUS_X** = ``0``
  99. Enumerated value for the +X axis.
  100. .. _class_LookAtModifier3D_constant_BONE_AXIS_MINUS_X:
  101. .. rst-class:: classref-enumeration-constant
  102. :ref:`BoneAxis<enum_LookAtModifier3D_BoneAxis>` **BONE_AXIS_MINUS_X** = ``1``
  103. Enumerated value for the -X axis.
  104. .. _class_LookAtModifier3D_constant_BONE_AXIS_PLUS_Y:
  105. .. rst-class:: classref-enumeration-constant
  106. :ref:`BoneAxis<enum_LookAtModifier3D_BoneAxis>` **BONE_AXIS_PLUS_Y** = ``2``
  107. Enumerated value for the +Y axis.
  108. .. _class_LookAtModifier3D_constant_BONE_AXIS_MINUS_Y:
  109. .. rst-class:: classref-enumeration-constant
  110. :ref:`BoneAxis<enum_LookAtModifier3D_BoneAxis>` **BONE_AXIS_MINUS_Y** = ``3``
  111. Enumerated value for the -Y axis.
  112. .. _class_LookAtModifier3D_constant_BONE_AXIS_PLUS_Z:
  113. .. rst-class:: classref-enumeration-constant
  114. :ref:`BoneAxis<enum_LookAtModifier3D_BoneAxis>` **BONE_AXIS_PLUS_Z** = ``4``
  115. Enumerated value for the +Z axis.
  116. .. _class_LookAtModifier3D_constant_BONE_AXIS_MINUS_Z:
  117. .. rst-class:: classref-enumeration-constant
  118. :ref:`BoneAxis<enum_LookAtModifier3D_BoneAxis>` **BONE_AXIS_MINUS_Z** = ``5``
  119. Enumerated value for the -Z axis.
  120. .. rst-class:: classref-item-separator
  121. ----
  122. .. _enum_LookAtModifier3D_OriginFrom:
  123. .. rst-class:: classref-enumeration
  124. enum **OriginFrom**: :ref:`🔗<enum_LookAtModifier3D_OriginFrom>`
  125. .. _class_LookAtModifier3D_constant_ORIGIN_FROM_SELF:
  126. .. rst-class:: classref-enumeration-constant
  127. :ref:`OriginFrom<enum_LookAtModifier3D_OriginFrom>` **ORIGIN_FROM_SELF** = ``0``
  128. The bone rest position of the bone specified in :ref:`bone<class_LookAtModifier3D_property_bone>` is used as origin.
  129. .. _class_LookAtModifier3D_constant_ORIGIN_FROM_SPECIFIC_BONE:
  130. .. rst-class:: classref-enumeration-constant
  131. :ref:`OriginFrom<enum_LookAtModifier3D_OriginFrom>` **ORIGIN_FROM_SPECIFIC_BONE** = ``1``
  132. The bone global pose position of the bone specified in :ref:`origin_bone<class_LookAtModifier3D_property_origin_bone>` is used as origin.
  133. \ **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.
  134. .. _class_LookAtModifier3D_constant_ORIGIN_FROM_EXTERNAL_NODE:
  135. .. rst-class:: classref-enumeration-constant
  136. :ref:`OriginFrom<enum_LookAtModifier3D_OriginFrom>` **ORIGIN_FROM_EXTERNAL_NODE** = ``2``
  137. 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.
  138. \ **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.
  139. .. rst-class:: classref-section-separator
  140. ----
  141. .. rst-class:: classref-descriptions-group
  142. Property Descriptions
  143. ---------------------
  144. .. _class_LookAtModifier3D_property_bone:
  145. .. rst-class:: classref-property
  146. :ref:`int<class_int>` **bone** = ``0`` :ref:`🔗<class_LookAtModifier3D_property_bone>`
  147. .. rst-class:: classref-property-setget
  148. - |void| **set_bone**\ (\ value\: :ref:`int<class_int>`\ )
  149. - :ref:`int<class_int>` **get_bone**\ (\ )
  150. The bone index of the :ref:`Skeleton3D<class_Skeleton3D>` that the modification will operate on.
  151. .. rst-class:: classref-item-separator
  152. ----
  153. .. _class_LookAtModifier3D_property_duration:
  154. .. rst-class:: classref-property
  155. :ref:`float<class_float>` **duration** = ``0.0`` :ref:`🔗<class_LookAtModifier3D_property_duration>`
  156. .. rst-class:: classref-property-setget
  157. - |void| **set_duration**\ (\ value\: :ref:`float<class_float>`\ )
  158. - :ref:`float<class_float>` **get_duration**\ (\ )
  159. The duration of the time-based interpolation. Interpolation is triggered at the following cases:
  160. - When the target node is changed
  161. - When an axis is flipped due to angle limitation
  162. \ **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>`.
  163. .. rst-class:: classref-item-separator
  164. ----
  165. .. _class_LookAtModifier3D_property_ease_type:
  166. .. rst-class:: classref-property
  167. :ref:`EaseType<enum_Tween_EaseType>` **ease_type** = ``0`` :ref:`🔗<class_LookAtModifier3D_property_ease_type>`
  168. .. rst-class:: classref-property-setget
  169. - |void| **set_ease_type**\ (\ value\: :ref:`EaseType<enum_Tween_EaseType>`\ )
  170. - :ref:`EaseType<enum_Tween_EaseType>` **get_ease_type**\ (\ )
  171. The ease type of the time-based interpolation. See also :ref:`EaseType<enum_Tween_EaseType>`.
  172. .. rst-class:: classref-item-separator
  173. ----
  174. .. _class_LookAtModifier3D_property_forward_axis:
  175. .. rst-class:: classref-property
  176. :ref:`BoneAxis<enum_LookAtModifier3D_BoneAxis>` **forward_axis** = ``4`` :ref:`🔗<class_LookAtModifier3D_property_forward_axis>`
  177. .. rst-class:: classref-property-setget
  178. - |void| **set_forward_axis**\ (\ value\: :ref:`BoneAxis<enum_LookAtModifier3D_BoneAxis>`\ )
  179. - :ref:`BoneAxis<enum_LookAtModifier3D_BoneAxis>` **get_forward_axis**\ (\ )
  180. 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>`.
  181. .. rst-class:: classref-item-separator
  182. ----
  183. .. _class_LookAtModifier3D_property_origin_bone:
  184. .. rst-class:: classref-property
  185. :ref:`int<class_int>` **origin_bone** :ref:`🔗<class_LookAtModifier3D_property_origin_bone>`
  186. .. rst-class:: classref-property-setget
  187. - |void| **set_origin_bone**\ (\ value\: :ref:`int<class_int>`\ )
  188. - :ref:`int<class_int>` **get_origin_bone**\ (\ )
  189. 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.
  190. .. rst-class:: classref-item-separator
  191. ----
  192. .. _class_LookAtModifier3D_property_origin_external_node:
  193. .. rst-class:: classref-property
  194. :ref:`NodePath<class_NodePath>` **origin_external_node** :ref:`🔗<class_LookAtModifier3D_property_origin_external_node>`
  195. .. rst-class:: classref-property-setget
  196. - |void| **set_origin_external_node**\ (\ value\: :ref:`NodePath<class_NodePath>`\ )
  197. - :ref:`NodePath<class_NodePath>` **get_origin_external_node**\ (\ )
  198. 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.
  199. .. rst-class:: classref-item-separator
  200. ----
  201. .. _class_LookAtModifier3D_property_origin_from:
  202. .. rst-class:: classref-property
  203. :ref:`OriginFrom<enum_LookAtModifier3D_OriginFrom>` **origin_from** = ``0`` :ref:`🔗<class_LookAtModifier3D_property_origin_from>`
  204. .. rst-class:: classref-property-setget
  205. - |void| **set_origin_from**\ (\ value\: :ref:`OriginFrom<enum_LookAtModifier3D_OriginFrom>`\ )
  206. - :ref:`OriginFrom<enum_LookAtModifier3D_OriginFrom>` **get_origin_from**\ (\ )
  207. This value determines from what origin is retrieved for use in the calculation of the forward vector.
  208. .. rst-class:: classref-item-separator
  209. ----
  210. .. _class_LookAtModifier3D_property_origin_offset:
  211. .. rst-class:: classref-property
  212. :ref:`Vector3<class_Vector3>` **origin_offset** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_LookAtModifier3D_property_origin_offset>`
  213. .. rst-class:: classref-property-setget
  214. - |void| **set_origin_offset**\ (\ value\: :ref:`Vector3<class_Vector3>`\ )
  215. - :ref:`Vector3<class_Vector3>` **get_origin_offset**\ (\ )
  216. 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.
  217. \ **Note:** This value indicates the local position of the object set in :ref:`origin_from<class_LookAtModifier3D_property_origin_from>`.
  218. .. rst-class:: classref-item-separator
  219. ----
  220. .. _class_LookAtModifier3D_property_origin_safe_margin:
  221. .. rst-class:: classref-property
  222. :ref:`float<class_float>` **origin_safe_margin** = ``0.1`` :ref:`🔗<class_LookAtModifier3D_property_origin_safe_margin>`
  223. .. rst-class:: classref-property-setget
  224. - |void| **set_origin_safe_margin**\ (\ value\: :ref:`float<class_float>`\ )
  225. - :ref:`float<class_float>` **get_origin_safe_margin**\ (\ )
  226. 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.
  227. .. rst-class:: classref-item-separator
  228. ----
  229. .. _class_LookAtModifier3D_property_primary_damp_threshold:
  230. .. rst-class:: classref-property
  231. :ref:`float<class_float>` **primary_damp_threshold** :ref:`🔗<class_LookAtModifier3D_property_primary_damp_threshold>`
  232. .. rst-class:: classref-property-setget
  233. - |void| **set_primary_damp_threshold**\ (\ value\: :ref:`float<class_float>`\ )
  234. - :ref:`float<class_float>` **get_primary_damp_threshold**\ (\ )
  235. 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.
  236. If ``1.0``, no damping is performed. If ``0.0``, damping is always performed.
  237. .. rst-class:: classref-item-separator
  238. ----
  239. .. _class_LookAtModifier3D_property_primary_limit_angle:
  240. .. rst-class:: classref-property
  241. :ref:`float<class_float>` **primary_limit_angle** :ref:`🔗<class_LookAtModifier3D_property_primary_limit_angle>`
  242. .. rst-class:: classref-property-setget
  243. - |void| **set_primary_limit_angle**\ (\ value\: :ref:`float<class_float>`\ )
  244. - :ref:`float<class_float>` **get_primary_limit_angle**\ (\ )
  245. The limit angle of the primary rotation when :ref:`symmetry_limitation<class_LookAtModifier3D_property_symmetry_limitation>` is ``true``.
  246. .. rst-class:: classref-item-separator
  247. ----
  248. .. _class_LookAtModifier3D_property_primary_negative_damp_threshold:
  249. .. rst-class:: classref-property
  250. :ref:`float<class_float>` **primary_negative_damp_threshold** :ref:`🔗<class_LookAtModifier3D_property_primary_negative_damp_threshold>`
  251. .. rst-class:: classref-property-setget
  252. - |void| **set_primary_negative_damp_threshold**\ (\ value\: :ref:`float<class_float>`\ )
  253. - :ref:`float<class_float>` **get_primary_negative_damp_threshold**\ (\ )
  254. The threshold to start damping for :ref:`primary_negative_limit_angle<class_LookAtModifier3D_property_primary_negative_limit_angle>`.
  255. .. rst-class:: classref-item-separator
  256. ----
  257. .. _class_LookAtModifier3D_property_primary_negative_limit_angle:
  258. .. rst-class:: classref-property
  259. :ref:`float<class_float>` **primary_negative_limit_angle** :ref:`🔗<class_LookAtModifier3D_property_primary_negative_limit_angle>`
  260. .. rst-class:: classref-property-setget
  261. - |void| **set_primary_negative_limit_angle**\ (\ value\: :ref:`float<class_float>`\ )
  262. - :ref:`float<class_float>` **get_primary_negative_limit_angle**\ (\ )
  263. The limit angle of negative side of the primary rotation when :ref:`symmetry_limitation<class_LookAtModifier3D_property_symmetry_limitation>` is ``false``.
  264. .. rst-class:: classref-item-separator
  265. ----
  266. .. _class_LookAtModifier3D_property_primary_positive_damp_threshold:
  267. .. rst-class:: classref-property
  268. :ref:`float<class_float>` **primary_positive_damp_threshold** :ref:`🔗<class_LookAtModifier3D_property_primary_positive_damp_threshold>`
  269. .. rst-class:: classref-property-setget
  270. - |void| **set_primary_positive_damp_threshold**\ (\ value\: :ref:`float<class_float>`\ )
  271. - :ref:`float<class_float>` **get_primary_positive_damp_threshold**\ (\ )
  272. The threshold to start damping for :ref:`primary_positive_limit_angle<class_LookAtModifier3D_property_primary_positive_limit_angle>`.
  273. .. rst-class:: classref-item-separator
  274. ----
  275. .. _class_LookAtModifier3D_property_primary_positive_limit_angle:
  276. .. rst-class:: classref-property
  277. :ref:`float<class_float>` **primary_positive_limit_angle** :ref:`🔗<class_LookAtModifier3D_property_primary_positive_limit_angle>`
  278. .. rst-class:: classref-property-setget
  279. - |void| **set_primary_positive_limit_angle**\ (\ value\: :ref:`float<class_float>`\ )
  280. - :ref:`float<class_float>` **get_primary_positive_limit_angle**\ (\ )
  281. The limit angle of positive side of the primary rotation when :ref:`symmetry_limitation<class_LookAtModifier3D_property_symmetry_limitation>` is ``false``.
  282. .. rst-class:: classref-item-separator
  283. ----
  284. .. _class_LookAtModifier3D_property_primary_rotation_axis:
  285. .. rst-class:: classref-property
  286. Vector3.Axis **primary_rotation_axis** = ``1`` :ref:`🔗<class_LookAtModifier3D_property_primary_rotation_axis>`
  287. .. rst-class:: classref-property-setget
  288. - |void| **set_primary_rotation_axis**\ (\ value\: Vector3.Axis\ )
  289. - Vector3.Axis **get_primary_rotation_axis**\ (\ )
  290. 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>`.
  291. .. rst-class:: classref-item-separator
  292. ----
  293. .. _class_LookAtModifier3D_property_secondary_damp_threshold:
  294. .. rst-class:: classref-property
  295. :ref:`float<class_float>` **secondary_damp_threshold** :ref:`🔗<class_LookAtModifier3D_property_secondary_damp_threshold>`
  296. .. rst-class:: classref-property-setget
  297. - |void| **set_secondary_damp_threshold**\ (\ value\: :ref:`float<class_float>`\ )
  298. - :ref:`float<class_float>` **get_secondary_damp_threshold**\ (\ )
  299. The threshold to start damping for :ref:`secondary_limit_angle<class_LookAtModifier3D_property_secondary_limit_angle>`.
  300. .. rst-class:: classref-item-separator
  301. ----
  302. .. _class_LookAtModifier3D_property_secondary_limit_angle:
  303. .. rst-class:: classref-property
  304. :ref:`float<class_float>` **secondary_limit_angle** :ref:`🔗<class_LookAtModifier3D_property_secondary_limit_angle>`
  305. .. rst-class:: classref-property-setget
  306. - |void| **set_secondary_limit_angle**\ (\ value\: :ref:`float<class_float>`\ )
  307. - :ref:`float<class_float>` **get_secondary_limit_angle**\ (\ )
  308. The limit angle of the secondary rotation when :ref:`symmetry_limitation<class_LookAtModifier3D_property_symmetry_limitation>` is ``true``.
  309. .. rst-class:: classref-item-separator
  310. ----
  311. .. _class_LookAtModifier3D_property_secondary_negative_damp_threshold:
  312. .. rst-class:: classref-property
  313. :ref:`float<class_float>` **secondary_negative_damp_threshold** :ref:`🔗<class_LookAtModifier3D_property_secondary_negative_damp_threshold>`
  314. .. rst-class:: classref-property-setget
  315. - |void| **set_secondary_negative_damp_threshold**\ (\ value\: :ref:`float<class_float>`\ )
  316. - :ref:`float<class_float>` **get_secondary_negative_damp_threshold**\ (\ )
  317. The threshold to start damping for :ref:`secondary_negative_limit_angle<class_LookAtModifier3D_property_secondary_negative_limit_angle>`.
  318. .. rst-class:: classref-item-separator
  319. ----
  320. .. _class_LookAtModifier3D_property_secondary_negative_limit_angle:
  321. .. rst-class:: classref-property
  322. :ref:`float<class_float>` **secondary_negative_limit_angle** :ref:`🔗<class_LookAtModifier3D_property_secondary_negative_limit_angle>`
  323. .. rst-class:: classref-property-setget
  324. - |void| **set_secondary_negative_limit_angle**\ (\ value\: :ref:`float<class_float>`\ )
  325. - :ref:`float<class_float>` **get_secondary_negative_limit_angle**\ (\ )
  326. The limit angle of negative side of the secondary rotation when :ref:`symmetry_limitation<class_LookAtModifier3D_property_symmetry_limitation>` is ``false``.
  327. .. rst-class:: classref-item-separator
  328. ----
  329. .. _class_LookAtModifier3D_property_secondary_positive_damp_threshold:
  330. .. rst-class:: classref-property
  331. :ref:`float<class_float>` **secondary_positive_damp_threshold** :ref:`🔗<class_LookAtModifier3D_property_secondary_positive_damp_threshold>`
  332. .. rst-class:: classref-property-setget
  333. - |void| **set_secondary_positive_damp_threshold**\ (\ value\: :ref:`float<class_float>`\ )
  334. - :ref:`float<class_float>` **get_secondary_positive_damp_threshold**\ (\ )
  335. The threshold to start damping for :ref:`secondary_positive_limit_angle<class_LookAtModifier3D_property_secondary_positive_limit_angle>`.
  336. .. rst-class:: classref-item-separator
  337. ----
  338. .. _class_LookAtModifier3D_property_secondary_positive_limit_angle:
  339. .. rst-class:: classref-property
  340. :ref:`float<class_float>` **secondary_positive_limit_angle** :ref:`🔗<class_LookAtModifier3D_property_secondary_positive_limit_angle>`
  341. .. rst-class:: classref-property-setget
  342. - |void| **set_secondary_positive_limit_angle**\ (\ value\: :ref:`float<class_float>`\ )
  343. - :ref:`float<class_float>` **get_secondary_positive_limit_angle**\ (\ )
  344. The limit angle of positive side of the secondary rotation when :ref:`symmetry_limitation<class_LookAtModifier3D_property_symmetry_limitation>` is ``false``.
  345. .. rst-class:: classref-item-separator
  346. ----
  347. .. _class_LookAtModifier3D_property_symmetry_limitation:
  348. .. rst-class:: classref-property
  349. :ref:`bool<class_bool>` **symmetry_limitation** :ref:`🔗<class_LookAtModifier3D_property_symmetry_limitation>`
  350. .. rst-class:: classref-property-setget
  351. - |void| **set_symmetry_limitation**\ (\ value\: :ref:`bool<class_bool>`\ )
  352. - :ref:`bool<class_bool>` **is_limitation_symmetry**\ (\ )
  353. If ``true``, the limitations are spread from the bone symmetrically.
  354. If ``false``, the limitation can be specified separately for each side of the bone rest.
  355. .. rst-class:: classref-item-separator
  356. ----
  357. .. _class_LookAtModifier3D_property_target_node:
  358. .. rst-class:: classref-property
  359. :ref:`NodePath<class_NodePath>` **target_node** = ``NodePath("")`` :ref:`🔗<class_LookAtModifier3D_property_target_node>`
  360. .. rst-class:: classref-property-setget
  361. - |void| **set_target_node**\ (\ value\: :ref:`NodePath<class_NodePath>`\ )
  362. - :ref:`NodePath<class_NodePath>` **get_target_node**\ (\ )
  363. 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.
  364. .. rst-class:: classref-item-separator
  365. ----
  366. .. _class_LookAtModifier3D_property_transition_type:
  367. .. rst-class:: classref-property
  368. :ref:`TransitionType<enum_Tween_TransitionType>` **transition_type** = ``0`` :ref:`🔗<class_LookAtModifier3D_property_transition_type>`
  369. .. rst-class:: classref-property-setget
  370. - |void| **set_transition_type**\ (\ value\: :ref:`TransitionType<enum_Tween_TransitionType>`\ )
  371. - :ref:`TransitionType<enum_Tween_TransitionType>` **get_transition_type**\ (\ )
  372. The transition type of the time-based interpolation. See also :ref:`TransitionType<enum_Tween_TransitionType>`.
  373. .. rst-class:: classref-item-separator
  374. ----
  375. .. _class_LookAtModifier3D_property_use_angle_limitation:
  376. .. rst-class:: classref-property
  377. :ref:`bool<class_bool>` **use_angle_limitation** = ``false`` :ref:`🔗<class_LookAtModifier3D_property_use_angle_limitation>`
  378. .. rst-class:: classref-property-setget
  379. - |void| **set_use_angle_limitation**\ (\ value\: :ref:`bool<class_bool>`\ )
  380. - :ref:`bool<class_bool>` **is_using_angle_limitation**\ (\ )
  381. If ``true``, limits the degree of rotation. This helps prevent the character's neck from rotating 360 degrees.
  382. \ **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.
  383. \ **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.
  384. .. rst-class:: classref-item-separator
  385. ----
  386. .. _class_LookAtModifier3D_property_use_secondary_rotation:
  387. .. rst-class:: classref-property
  388. :ref:`bool<class_bool>` **use_secondary_rotation** = ``true`` :ref:`🔗<class_LookAtModifier3D_property_use_secondary_rotation>`
  389. .. rst-class:: classref-property-setget
  390. - |void| **set_use_secondary_rotation**\ (\ value\: :ref:`bool<class_bool>`\ )
  391. - :ref:`bool<class_bool>` **is_using_secondary_rotation**\ (\ )
  392. If ``true``, provides rotation by two axes.
  393. .. rst-class:: classref-section-separator
  394. ----
  395. .. rst-class:: classref-descriptions-group
  396. Method Descriptions
  397. -------------------
  398. .. _class_LookAtModifier3D_method_get_interpolation_remaining:
  399. .. rst-class:: classref-method
  400. :ref:`float<class_float>` **get_interpolation_remaining**\ (\ ) |const| :ref:`🔗<class_LookAtModifier3D_method_get_interpolation_remaining>`
  401. Returns the remaining seconds of the time-based interpolation.
  402. .. rst-class:: classref-item-separator
  403. ----
  404. .. _class_LookAtModifier3D_method_is_interpolating:
  405. .. rst-class:: classref-method
  406. :ref:`bool<class_bool>` **is_interpolating**\ (\ ) |const| :ref:`🔗<class_LookAtModifier3D_method_is_interpolating>`
  407. 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``.
  408. This is useful to determine whether a **LookAtModifier3D** can be removed safely.
  409. .. rst-class:: classref-item-separator
  410. ----
  411. .. _class_LookAtModifier3D_method_is_target_within_limitation:
  412. .. rst-class:: classref-method
  413. :ref:`bool<class_bool>` **is_target_within_limitation**\ (\ ) |const| :ref:`🔗<class_LookAtModifier3D_method_is_target_within_limitation>`
  414. 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.
  415. \ **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>`.
  416. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  417. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  418. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  419. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  420. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  421. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  422. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  423. .. |void| replace:: :abbr:`void (No return value.)`