SkeletonModification3D.xml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="SkeletonModification3D" inherits="Resource" version="4.0">
  3. <brief_description>
  4. A resource that operates on bones in a [Skeleton3D].
  5. </brief_description>
  6. <description>
  7. This resource provides an interface that can be expanded so code that operates on bones in a [Skeleton3D] can be mixed and matched together to create complex interactions.
  8. This is used to provide Godot with a flexible and powerful Inverse Kinematics solution that can be adapted for many different uses.
  9. </description>
  10. <tutorials>
  11. </tutorials>
  12. <methods>
  13. <method name="_execute" qualifiers="virtual">
  14. <return type="void" />
  15. <argument index="0" name="delta" type="float" />
  16. <description>
  17. Executes the given modification. This is where the modification performs whatever function it is designed to do.
  18. </description>
  19. </method>
  20. <method name="_setup_modification" qualifiers="virtual">
  21. <return type="void" />
  22. <argument index="0" name="modification_stack" type="SkeletonModificationStack3D" />
  23. <description>
  24. Sets up the modification so it can be executed. This function should be called automatically by the [SkeletonModificationStack3D] containing this modification.
  25. If you need to initialize a modification before use, this is the place to do it!
  26. </description>
  27. </method>
  28. <method name="clamp_angle">
  29. <return type="float" />
  30. <argument index="0" name="angle" type="float" />
  31. <argument index="1" name="min" type="float" />
  32. <argument index="2" name="max" type="float" />
  33. <argument index="3" name="invert" type="bool" />
  34. <description>
  35. Takes a angle and clamps it so it is within the passed-in [code]min[/code] and [code]max[/code] range. [code]invert[/code] will inversely clamp the angle, clamping it to the range outside of the given bounds.
  36. </description>
  37. </method>
  38. <method name="get_is_setup" qualifiers="const">
  39. <return type="bool" />
  40. <description>
  41. Returns whether this modification has been successfully setup or not.
  42. </description>
  43. </method>
  44. <method name="get_modification_stack">
  45. <return type="SkeletonModificationStack3D" />
  46. <description>
  47. Returns the [SkeletonModificationStack3D] that this modification is bound to. Through the modification stack, you can access the Skeleton3D the modification is operating on.
  48. </description>
  49. </method>
  50. <method name="set_is_setup">
  51. <return type="void" />
  52. <argument index="0" name="is_setup" type="bool" />
  53. <description>
  54. Manually allows you to set the setup state of the modification. This function should only rarely be used, as the [SkeletonModificationStack3D] the modification is bound to should handle setting the modification up.
  55. </description>
  56. </method>
  57. </methods>
  58. <members>
  59. <member name="enabled" type="bool" setter="set_enabled" getter="get_enabled" default="true">
  60. When true, the modification's [method _execute] function will be called by the [SkeletonModificationStack3D].
  61. </member>
  62. <member name="execution_mode" type="int" setter="set_execution_mode" getter="get_execution_mode" default="0">
  63. The execution mode for the modification. This tells the modification stack when to execute the modification. Some modifications have settings that are only availible in certain execution modes.
  64. </member>
  65. </members>
  66. </class>