SoftBody.xml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="SoftBody" inherits="MeshInstance" version="3.4">
  3. <brief_description>
  4. A soft mesh physics body.
  5. </brief_description>
  6. <description>
  7. A deformable physics body. Used to create elastic or deformable objects such as cloth, rubber, or other flexible materials.
  8. </description>
  9. <tutorials>
  10. <link>https://docs.godotengine.org/en/3.3/tutorials/physics/soft_body.html</link>
  11. </tutorials>
  12. <methods>
  13. <method name="add_collision_exception_with">
  14. <return type="void">
  15. </return>
  16. <argument index="0" name="body" type="Node">
  17. </argument>
  18. <description>
  19. Adds a body to the list of bodies that this body can't collide with.
  20. </description>
  21. </method>
  22. <method name="get_collision_exceptions">
  23. <return type="Array">
  24. </return>
  25. <description>
  26. Returns an array of nodes that were added as collision exceptions for this body.
  27. </description>
  28. </method>
  29. <method name="get_collision_layer_bit" qualifiers="const">
  30. <return type="bool">
  31. </return>
  32. <argument index="0" name="bit" type="int">
  33. </argument>
  34. <description>
  35. Returns an individual bit on the collision mask.
  36. </description>
  37. </method>
  38. <method name="get_collision_mask_bit" qualifiers="const">
  39. <return type="bool">
  40. </return>
  41. <argument index="0" name="bit" type="int">
  42. </argument>
  43. <description>
  44. Returns an individual bit on the collision mask.
  45. </description>
  46. </method>
  47. <method name="remove_collision_exception_with">
  48. <return type="void">
  49. </return>
  50. <argument index="0" name="body" type="Node">
  51. </argument>
  52. <description>
  53. Removes a body from the list of bodies that this body can't collide with.
  54. </description>
  55. </method>
  56. <method name="set_collision_layer_bit">
  57. <return type="void">
  58. </return>
  59. <argument index="0" name="bit" type="int">
  60. </argument>
  61. <argument index="1" name="value" type="bool">
  62. </argument>
  63. <description>
  64. Sets individual bits on the layer mask. Use this if you only need to change one layer's value.
  65. </description>
  66. </method>
  67. <method name="set_collision_mask_bit">
  68. <return type="void">
  69. </return>
  70. <argument index="0" name="bit" type="int">
  71. </argument>
  72. <argument index="1" name="value" type="bool">
  73. </argument>
  74. <description>
  75. Sets individual bits on the collision mask. Use this if you only need to change one layer's value.
  76. </description>
  77. </method>
  78. </methods>
  79. <members>
  80. <member name="areaAngular_stiffness" type="float" setter="set_areaAngular_stiffness" getter="get_areaAngular_stiffness" default="0.5">
  81. </member>
  82. <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1">
  83. The physics layers this SoftBody is in.
  84. Collidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the collision_mask property.
  85. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. See [url=https://docs.godotengine.org/en/3.3/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
  86. </member>
  87. <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1">
  88. The physics layers this SoftBody scans for collisions. See [url=https://docs.godotengine.org/en/3.3/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
  89. </member>
  90. <member name="damping_coefficient" type="float" setter="set_damping_coefficient" getter="get_damping_coefficient" default="0.01">
  91. </member>
  92. <member name="drag_coefficient" type="float" setter="set_drag_coefficient" getter="get_drag_coefficient" default="0.0">
  93. </member>
  94. <member name="linear_stiffness" type="float" setter="set_linear_stiffness" getter="get_linear_stiffness" default="0.5">
  95. </member>
  96. <member name="parent_collision_ignore" type="NodePath" setter="set_parent_collision_ignore" getter="get_parent_collision_ignore" default="NodePath(&quot;&quot;)">
  97. [NodePath] to a [CollisionObject] this SoftBody should avoid clipping.
  98. </member>
  99. <member name="pose_matching_coefficient" type="float" setter="set_pose_matching_coefficient" getter="get_pose_matching_coefficient" default="0.0">
  100. </member>
  101. <member name="pressure_coefficient" type="float" setter="set_pressure_coefficient" getter="get_pressure_coefficient" default="0.0">
  102. </member>
  103. <member name="ray_pickable" type="bool" setter="set_ray_pickable" getter="is_ray_pickable" default="true">
  104. If [code]true[/code], the [SoftBody] will respond to [RayCast]s.
  105. </member>
  106. <member name="simulation_precision" type="int" setter="set_simulation_precision" getter="get_simulation_precision" default="5">
  107. Increasing this value will improve the resulting simulation, but can affect performance. Use with care.
  108. </member>
  109. <member name="total_mass" type="float" setter="set_total_mass" getter="get_total_mass" default="1.0">
  110. The SoftBody's mass.
  111. </member>
  112. <member name="volume_stiffness" type="float" setter="set_volume_stiffness" getter="get_volume_stiffness" default="0.5">
  113. </member>
  114. </members>
  115. <constants>
  116. </constants>
  117. </class>