2
0

SkeletonModification3DLookAt.xml 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="SkeletonModification3DLookAt" inherits="SkeletonModification3D" version="4.0">
  3. <brief_description>
  4. A modification that rotates a bone to look at a target.
  5. </brief_description>
  6. <description>
  7. This [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.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <methods>
  12. <method name="get_additional_rotation" qualifiers="const">
  13. <return type="Vector3" />
  14. <description>
  15. Returns the amount of extra rotation that is applied to the bone after the LookAt modification executes.
  16. </description>
  17. </method>
  18. <method name="get_lock_rotation_plane" qualifiers="const">
  19. <return type="int" />
  20. <description>
  21. Returns the plane that the LookAt modification is limiting rotation to.
  22. </description>
  23. </method>
  24. <method name="get_lock_rotation_to_plane" qualifiers="const">
  25. <return type="bool" />
  26. <description>
  27. Returns whether the LookAt modification is limiting rotation to a single plane in 3D space.
  28. </description>
  29. </method>
  30. <method name="set_additional_rotation">
  31. <return type="void" />
  32. <argument index="0" name="additional_rotation" type="Vector3" />
  33. <description>
  34. Sets the amount of extra rotation to be applied after the LookAt modification executes. This allows you to adjust the finished result.
  35. </description>
  36. </method>
  37. <method name="set_lock_rotation_plane">
  38. <return type="void" />
  39. <argument index="0" name="plane" type="int" />
  40. <description>
  41. </description>
  42. </method>
  43. <method name="set_lock_rotation_to_plane">
  44. <return type="void" />
  45. <argument index="0" name="lock_to_plane" type="bool" />
  46. <description>
  47. When [code]true[/code], the LookAt modification will limit its rotation to a single plane in 3D space. The plane used can be configured using the [code]set_lock_rotation_plane[/code] function.
  48. </description>
  49. </method>
  50. </methods>
  51. <members>
  52. <member name="bone_index" type="int" setter="set_bone_index" getter="get_bone_index" default="-2">
  53. The bone index of the bone that should be operated on by this modification.
  54. When possible, this will also update the [member bone_name] based on data provided by the [Skeleton3D].
  55. </member>
  56. <member name="bone_name" type="String" setter="set_bone_name" getter="get_bone_name" default="&quot;&quot;">
  57. The name of the bone that should be operated on by this modification.
  58. When possible, this will also update the [member bone_index] based on data provided by the [Skeleton3D].
  59. </member>
  60. <member name="target_nodepath" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath(&quot;&quot;)">
  61. The NodePath to the node that is the target for the modification.
  62. </member>
  63. </members>
  64. </class>