HingeJoint.xml 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="HingeJoint" inherits="Joint" category="Core" version="3.1">
  3. <brief_description>
  4. A hinge between two 3D bodies.
  5. </brief_description>
  6. <description>
  7. Normally 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. </methods>
  15. <members>
  16. <member name="angular_limit/bias" type="float" setter="set_param" getter="get_param">
  17. The speed with which the rotation across the axis perpendicular to the hinge gets corrected.
  18. </member>
  19. <member name="angular_limit/enable" type="bool" setter="set_flag" getter="get_flag">
  20. If [code]true[/code], the hinges maximum and minimum rotation, defined by [member angular_limit/lower] and [member angular_limit/upper] has effects.
  21. </member>
  22. <member name="angular_limit/lower" type="float" setter="_set_lower_limit" getter="_get_lower_limit">
  23. The minimum rotation. only active if [member angular_limit/enable] is [code]true[/code].
  24. </member>
  25. <member name="angular_limit/relaxation" type="float" setter="set_param" getter="get_param">
  26. The lower this value, the more the rotation gets slowed down.
  27. </member>
  28. <member name="angular_limit/softness" type="float" setter="set_param" getter="get_param">
  29. </member>
  30. <member name="angular_limit/upper" type="float" setter="_set_upper_limit" getter="_get_upper_limit">
  31. The maximum rotation. only active if [member angular_limit/enable] is [code]true[/code].
  32. </member>
  33. <member name="motor/enable" type="bool" setter="set_flag" getter="get_flag">
  34. When activated, a motor turns the hinge.
  35. </member>
  36. <member name="motor/max_impulse" type="float" setter="set_param" getter="get_param">
  37. Maximum acceleration for the motor.
  38. </member>
  39. <member name="motor/target_velocity" type="float" setter="set_param" getter="get_param">
  40. Target speed for the motor.
  41. </member>
  42. <member name="params/bias" type="float" setter="set_param" getter="get_param">
  43. The speed with which the two bodies get pulled together when they move in different directions.
  44. </member>
  45. </members>
  46. <constants>
  47. <constant name="PARAM_BIAS" value="0" enum="Param">
  48. The speed with which the two bodies get pulled together when they move in different directions.
  49. </constant>
  50. <constant name="PARAM_LIMIT_UPPER" value="1" enum="Param">
  51. The maximum rotation. only active if [member angular_limit/enable] is [code]true[/code].
  52. </constant>
  53. <constant name="PARAM_LIMIT_LOWER" value="2" enum="Param">
  54. The minimum rotation. only active if [member angular_limit/enable] is [code]true[/code].
  55. </constant>
  56. <constant name="PARAM_LIMIT_BIAS" value="3" enum="Param">
  57. The speed with which the rotation across the axis perpendicular to the hinge gets corrected.
  58. </constant>
  59. <constant name="PARAM_LIMIT_SOFTNESS" value="4" enum="Param">
  60. </constant>
  61. <constant name="PARAM_LIMIT_RELAXATION" value="5" enum="Param">
  62. The lower this value, the more the rotation gets slowed down.
  63. </constant>
  64. <constant name="PARAM_MOTOR_TARGET_VELOCITY" value="6" enum="Param">
  65. Target speed for the motor.
  66. </constant>
  67. <constant name="PARAM_MOTOR_MAX_IMPULSE" value="7" enum="Param">
  68. Maximum acceleration for the motor.
  69. </constant>
  70. <constant name="PARAM_MAX" value="8" enum="Param">
  71. End flag of PARAM_* constants, used internally.
  72. </constant>
  73. <constant name="FLAG_USE_LIMIT" value="0" enum="Flag">
  74. If [code]true[/code], the hinges maximum and minimum rotation, defined by [member angular_limit/lower] and [member angular_limit/upper] has effects.
  75. </constant>
  76. <constant name="FLAG_ENABLE_MOTOR" value="1" enum="Flag">
  77. When activated, a motor turns the hinge.
  78. </constant>
  79. <constant name="FLAG_MAX" value="2" enum="Flag">
  80. End flag of FLAG_* constants, used internally.
  81. </constant>
  82. </constants>
  83. </class>