HingeJoint.xml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="HingeJoint" inherits="Joint" category="Core" version="3.0.alpha.custom_build">
  3. <brief_description>
  4. A hinge between two 3D bodies.
  5. </brief_description>
  6. <description>
  7. Normaly uses the z-axis of body A as the hinge axis, another axis can be specified when adding it manually though.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <demos>
  12. </demos>
  13. <methods>
  14. <method name="get_flag" qualifiers="const">
  15. <return type="bool">
  16. </return>
  17. <argument index="0" name="flag" type="int" enum="HingeJoint.Flag">
  18. </argument>
  19. <description>
  20. </description>
  21. </method>
  22. <method name="get_param" qualifiers="const">
  23. <return type="float">
  24. </return>
  25. <argument index="0" name="param" type="int" enum="HingeJoint.Param">
  26. </argument>
  27. <description>
  28. </description>
  29. </method>
  30. <method name="set_flag">
  31. <return type="void">
  32. </return>
  33. <argument index="0" name="flag" type="int" enum="HingeJoint.Flag">
  34. </argument>
  35. <argument index="1" name="enabled" type="bool">
  36. </argument>
  37. <description>
  38. </description>
  39. </method>
  40. <method name="set_param">
  41. <return type="void">
  42. </return>
  43. <argument index="0" name="param" type="int" enum="HingeJoint.Param">
  44. </argument>
  45. <argument index="1" name="value" type="float">
  46. </argument>
  47. <description>
  48. </description>
  49. </method>
  50. </methods>
  51. <members>
  52. <member name="angular_limit/bias" type="float" setter="set_param" getter="get_param">
  53. The speed with which the rotation across the axis perpendicular to the hinge gets corrected.
  54. </member>
  55. <member name="angular_limit/enable" type="bool" setter="set_flag" getter="get_flag">
  56. If [code]true[/code] the hinges maximum and minimum rotation, defined by [member angular_limit/lower] and [member angular_limit/upper] has effects.
  57. </member>
  58. <member name="angular_limit/lower" type="float" setter="_set_lower_limit" getter="_get_lower_limit">
  59. The minimum rotation. only active if [member angular_limit/enable] is [code]true[/code].
  60. </member>
  61. <member name="angular_limit/relaxation" type="float" setter="set_param" getter="get_param">
  62. The lower this value, the more the rotation gets slowed down.
  63. </member>
  64. <member name="angular_limit/softness" type="float" setter="set_param" getter="get_param">
  65. </member>
  66. <member name="angular_limit/upper" type="float" setter="_set_upper_limit" getter="_get_upper_limit">
  67. The maximum rotation. only active if [member angular_limit/enable] is [code]true[/code].
  68. </member>
  69. <member name="motor/enable" type="bool" setter="set_flag" getter="get_flag">
  70. When activated, a motor turns the hinge.
  71. </member>
  72. <member name="motor/max_impulse" type="float" setter="set_param" getter="get_param">
  73. Maximum acceleration for the motor.
  74. </member>
  75. <member name="motor/target_velocity" type="float" setter="set_param" getter="get_param">
  76. Target speed for the motor.
  77. </member>
  78. <member name="params/bias" type="float" setter="set_param" getter="get_param">
  79. The speed with wich the two bodies get pulled together when they move in different directions.
  80. </member>
  81. </members>
  82. <constants>
  83. <constant name="PARAM_BIAS" value="0">
  84. The speed with wich the two bodies get pulled together when they move in different directions.
  85. </constant>
  86. <constant name="PARAM_LIMIT_UPPER" value="1">
  87. The maximum rotation. only active if [member angular_limit/enable] is [code]true[/code].
  88. </constant>
  89. <constant name="PARAM_LIMIT_LOWER" value="2">
  90. The minimum rotation. only active if [member angular_limit/enable] is [code]true[/code].
  91. </constant>
  92. <constant name="PARAM_LIMIT_BIAS" value="3">
  93. The speed with which the rotation across the axis perpendicular to the hinge gets corrected.
  94. </constant>
  95. <constant name="PARAM_LIMIT_SOFTNESS" value="4">
  96. </constant>
  97. <constant name="PARAM_LIMIT_RELAXATION" value="5">
  98. The lower this value, the more the rotation gets slowed down.
  99. </constant>
  100. <constant name="PARAM_MOTOR_TARGET_VELOCITY" value="6">
  101. Target speed for the motor.
  102. </constant>
  103. <constant name="PARAM_MOTOR_MAX_IMPULSE" value="7">
  104. Maximum acceleration for the motor.
  105. </constant>
  106. <constant name="PARAM_MAX" value="8">
  107. End flag of PARAM_* constants, used internally.
  108. </constant>
  109. <constant name="FLAG_USE_LIMIT" value="0">
  110. If [code]true[/code] the hinges maximum and minimum rotation, defined by [member angular_limit/lower] and [member angular_limit/upper] has effects.
  111. </constant>
  112. <constant name="FLAG_ENABLE_MOTOR" value="1">
  113. When activated, a motor turns the hinge.
  114. </constant>
  115. <constant name="FLAG_MAX" value="2">
  116. End flag of FLAG_* constants, used internally.
  117. </constant>
  118. </constants>
  119. </class>