class_skeletonmodification3dlookat.rst 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  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/SkeletonModification3DLookAt.xml.
  6. .. _class_SkeletonModification3DLookAt:
  7. SkeletonModification3DLookAt
  8. ============================
  9. **Inherits:** :ref:`SkeletonModification3D<class_SkeletonModification3D>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. A modification that rotates a bone to look at a target.
  11. Description
  12. -----------
  13. This :ref:`SkeletonModification3D<class_SkeletonModification3D>` rotates a bone to look a target. This is extremely helpful for moving character's heads 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.
  14. Properties
  15. ----------
  16. +---------------------------------+-------------------------------------------------------------------------------------+------------------+
  17. | :ref:`int<class_int>` | :ref:`bone_index<class_SkeletonModification3DLookAt_property_bone_index>` | ``-2`` |
  18. +---------------------------------+-------------------------------------------------------------------------------------+------------------+
  19. | :ref:`String<class_String>` | :ref:`bone_name<class_SkeletonModification3DLookAt_property_bone_name>` | ``""`` |
  20. +---------------------------------+-------------------------------------------------------------------------------------+------------------+
  21. | :ref:`NodePath<class_NodePath>` | :ref:`target_nodepath<class_SkeletonModification3DLookAt_property_target_nodepath>` | ``NodePath("")`` |
  22. +---------------------------------+-------------------------------------------------------------------------------------+------------------+
  23. Methods
  24. -------
  25. +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
  26. | :ref:`Vector3<class_Vector3>` | :ref:`get_additional_rotation<class_SkeletonModification3DLookAt_method_get_additional_rotation>` **(** **)** |const| |
  27. +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
  28. | :ref:`int<class_int>` | :ref:`get_lock_rotation_plane<class_SkeletonModification3DLookAt_method_get_lock_rotation_plane>` **(** **)** |const| |
  29. +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
  30. | :ref:`bool<class_bool>` | :ref:`get_lock_rotation_to_plane<class_SkeletonModification3DLookAt_method_get_lock_rotation_to_plane>` **(** **)** |const| |
  31. +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
  32. | void | :ref:`set_additional_rotation<class_SkeletonModification3DLookAt_method_set_additional_rotation>` **(** :ref:`Vector3<class_Vector3>` additional_rotation **)** |
  33. +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
  34. | void | :ref:`set_lock_rotation_plane<class_SkeletonModification3DLookAt_method_set_lock_rotation_plane>` **(** :ref:`int<class_int>` plane **)** |
  35. +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
  36. | void | :ref:`set_lock_rotation_to_plane<class_SkeletonModification3DLookAt_method_set_lock_rotation_to_plane>` **(** :ref:`bool<class_bool>` lock_to_plane **)** |
  37. +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. Property Descriptions
  39. ---------------------
  40. .. _class_SkeletonModification3DLookAt_property_bone_index:
  41. - :ref:`int<class_int>` **bone_index**
  42. +-----------+-----------------------+
  43. | *Default* | ``-2`` |
  44. +-----------+-----------------------+
  45. | *Setter* | set_bone_index(value) |
  46. +-----------+-----------------------+
  47. | *Getter* | get_bone_index() |
  48. +-----------+-----------------------+
  49. The bone index of the bone that should be operated on by this modification.
  50. When possible, this will also update the :ref:`bone_name<class_SkeletonModification3DLookAt_property_bone_name>` based on data provided by the :ref:`Skeleton3D<class_Skeleton3D>`.
  51. ----
  52. .. _class_SkeletonModification3DLookAt_property_bone_name:
  53. - :ref:`String<class_String>` **bone_name**
  54. +-----------+----------------------+
  55. | *Default* | ``""`` |
  56. +-----------+----------------------+
  57. | *Setter* | set_bone_name(value) |
  58. +-----------+----------------------+
  59. | *Getter* | get_bone_name() |
  60. +-----------+----------------------+
  61. The name of the bone that should be operated on by this modification.
  62. When possible, this will also update the :ref:`bone_index<class_SkeletonModification3DLookAt_property_bone_index>` based on data provided by the :ref:`Skeleton3D<class_Skeleton3D>`.
  63. ----
  64. .. _class_SkeletonModification3DLookAt_property_target_nodepath:
  65. - :ref:`NodePath<class_NodePath>` **target_nodepath**
  66. +-----------+------------------------+
  67. | *Default* | ``NodePath("")`` |
  68. +-----------+------------------------+
  69. | *Setter* | set_target_node(value) |
  70. +-----------+------------------------+
  71. | *Getter* | get_target_node() |
  72. +-----------+------------------------+
  73. The NodePath to the node that is the target for the modification.
  74. Method Descriptions
  75. -------------------
  76. .. _class_SkeletonModification3DLookAt_method_get_additional_rotation:
  77. - :ref:`Vector3<class_Vector3>` **get_additional_rotation** **(** **)** |const|
  78. Returns the amount of extra rotation that is applied to the bone after the LookAt modification executes.
  79. ----
  80. .. _class_SkeletonModification3DLookAt_method_get_lock_rotation_plane:
  81. - :ref:`int<class_int>` **get_lock_rotation_plane** **(** **)** |const|
  82. Returns the plane that the LookAt modification is limiting rotation to.
  83. ----
  84. .. _class_SkeletonModification3DLookAt_method_get_lock_rotation_to_plane:
  85. - :ref:`bool<class_bool>` **get_lock_rotation_to_plane** **(** **)** |const|
  86. Returns whether the LookAt modification is limiting rotation to a single plane in 3D space.
  87. ----
  88. .. _class_SkeletonModification3DLookAt_method_set_additional_rotation:
  89. - void **set_additional_rotation** **(** :ref:`Vector3<class_Vector3>` additional_rotation **)**
  90. Sets the amount of extra rotation to be applied after the LookAt modification executes. This allows you to adjust the finished result.
  91. ----
  92. .. _class_SkeletonModification3DLookAt_method_set_lock_rotation_plane:
  93. - void **set_lock_rotation_plane** **(** :ref:`int<class_int>` plane **)**
  94. ----
  95. .. _class_SkeletonModification3DLookAt_method_set_lock_rotation_to_plane:
  96. - void **set_lock_rotation_to_plane** **(** :ref:`bool<class_bool>` lock_to_plane **)**
  97. When ``true``, the LookAt modification will limit its rotation to a single plane in 3D space. The plane used can be configured using the ``set_lock_rotation_plane`` function.
  98. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  99. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  100. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  101. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  102. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  103. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`