GrooveJoint2D.xml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="GrooveJoint2D" inherits="Joint2D" category="Core" version="3.0.alpha.custom_build">
  3. <brief_description>
  4. Groove constraint for 2D physics.
  5. </brief_description>
  6. <description>
  7. Groove constraint for 2D physics. This is useful for making a body "slide" through a segment placed in another.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <demos>
  12. </demos>
  13. <methods>
  14. <method name="get_initial_offset" qualifiers="const">
  15. <return type="float">
  16. </return>
  17. <description>
  18. Set the final offset of the groove on body A.
  19. </description>
  20. </method>
  21. <method name="get_length" qualifiers="const">
  22. <return type="float">
  23. </return>
  24. <description>
  25. Return the length of the groove.
  26. </description>
  27. </method>
  28. <method name="set_initial_offset">
  29. <return type="void">
  30. </return>
  31. <argument index="0" name="offset" type="float">
  32. </argument>
  33. <description>
  34. Set the initial offset of the groove on body A.
  35. </description>
  36. </method>
  37. <method name="set_length">
  38. <return type="void">
  39. </return>
  40. <argument index="0" name="length" type="float">
  41. </argument>
  42. <description>
  43. Set the length of the groove.
  44. </description>
  45. </method>
  46. </methods>
  47. <members>
  48. <member name="initial_offset" type="float" setter="set_initial_offset" getter="get_initial_offset">
  49. The body B's initial anchor position defined by the joint's origin and a local offset [member initial_offset] along the joint's y axis (along the groove). Default value: [code]25[/code]
  50. </member>
  51. <member name="length" type="float" setter="set_length" getter="get_length">
  52. The groove's length. The groove is from the joint's origin towards [member length] along the joint's local y axis. Default value: [code]50[/code]
  53. </member>
  54. </members>
  55. <constants>
  56. </constants>
  57. </class>