2
0

SoftDynamicBody3D.xml 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="SoftDynamicBody3D" inherits="MeshInstance3D" version="4.0">
  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 title="SoftBody">https://docs.godotengine.org/en/latest/tutorials/physics/soft_body.html</link>
  11. </tutorials>
  12. <methods>
  13. <method name="add_collision_exception_with">
  14. <return type="void" />
  15. <argument index="0" name="body" type="Node" />
  16. <description>
  17. Adds a body to the list of bodies that this body can't collide with.
  18. </description>
  19. </method>
  20. <method name="get_collision_exceptions">
  21. <return type="Array" />
  22. <description>
  23. Returns an array of nodes that were added as collision exceptions for this body.
  24. </description>
  25. </method>
  26. <method name="get_collision_layer_value" qualifiers="const">
  27. <return type="bool" />
  28. <argument index="0" name="layer_number" type="int" />
  29. <description>
  30. Returns whether or not the specified layer of the [member collision_layer] is enabled, given a [code]layer_number[/code] between 1 and 32.
  31. </description>
  32. </method>
  33. <method name="get_collision_mask_value" qualifiers="const">
  34. <return type="bool" />
  35. <argument index="0" name="layer_number" type="int" />
  36. <description>
  37. Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [code]layer_number[/code] between 1 and 32.
  38. </description>
  39. </method>
  40. <method name="get_physics_rid" qualifiers="const">
  41. <return type="RID" />
  42. <description>
  43. </description>
  44. </method>
  45. <method name="get_point_transform">
  46. <return type="Vector3" />
  47. <argument index="0" name="point_index" type="int" />
  48. <description>
  49. Returns local translation of a vertex in the surface array.
  50. </description>
  51. </method>
  52. <method name="is_point_pinned" qualifiers="const">
  53. <return type="bool" />
  54. <argument index="0" name="point_index" type="int" />
  55. <description>
  56. Returns [code]true[/code] if vertex is set to pinned.
  57. </description>
  58. </method>
  59. <method name="remove_collision_exception_with">
  60. <return type="void" />
  61. <argument index="0" name="body" type="Node" />
  62. <description>
  63. Removes a body from the list of bodies that this body can't collide with.
  64. </description>
  65. </method>
  66. <method name="set_collision_layer_value">
  67. <return type="void" />
  68. <argument index="0" name="layer_number" type="int" />
  69. <argument index="1" name="value" type="bool" />
  70. <description>
  71. Based on [code]value[/code], enables or disables the specified layer in the [member collision_layer], given a [code]layer_number[/code] between 1 and 32.
  72. </description>
  73. </method>
  74. <method name="set_collision_mask_value">
  75. <return type="void" />
  76. <argument index="0" name="layer_number" type="int" />
  77. <argument index="1" name="value" type="bool" />
  78. <description>
  79. Based on [code]value[/code], enables or disables the specified layer in the [member collision_mask], given a [code]layer_number[/code] between 1 and 32.
  80. </description>
  81. </method>
  82. <method name="set_point_pinned">
  83. <return type="void" />
  84. <argument index="0" name="point_index" type="int" />
  85. <argument index="1" name="pinned" type="bool" />
  86. <argument index="2" name="attachment_path" type="NodePath" default="NodePath(&quot;&quot;)" />
  87. <description>
  88. Sets the pinned state of a surface vertex. When set to [code]true[/code], the optional [code]attachment_path[/code] can define a [Node3D] the pinned vertex will be attached to.
  89. </description>
  90. </method>
  91. </methods>
  92. <members>
  93. <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1">
  94. The physics layers this SoftDynamicBody3D [b]is in[/b]. Collision objects can exist in one or more of 32 different layers. See also [member collision_mask].
  95. [b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
  96. </member>
  97. <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1">
  98. The physics layers this SoftDynamicBody3D [b]scans[/b]. Collision objects can scan one or more of 32 different layers. See also [member collision_layer].
  99. [b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
  100. </member>
  101. <member name="damping_coefficient" type="float" setter="set_damping_coefficient" getter="get_damping_coefficient" default="0.01">
  102. </member>
  103. <member name="disable_mode" type="int" setter="set_disable_mode" getter="get_disable_mode" enum="SoftDynamicBody3D.DisableMode" default="0">
  104. Defines the behavior in physics when [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED]. See [enum DisableMode] for more details about the different modes.
  105. </member>
  106. <member name="drag_coefficient" type="float" setter="set_drag_coefficient" getter="get_drag_coefficient" default="0.0">
  107. </member>
  108. <member name="linear_stiffness" type="float" setter="set_linear_stiffness" getter="get_linear_stiffness" default="0.5">
  109. </member>
  110. <member name="parent_collision_ignore" type="NodePath" setter="set_parent_collision_ignore" getter="get_parent_collision_ignore" default="NodePath(&quot;&quot;)">
  111. [NodePath] to a [CollisionObject3D] this SoftDynamicBody3D should avoid clipping.
  112. </member>
  113. <member name="pressure_coefficient" type="float" setter="set_pressure_coefficient" getter="get_pressure_coefficient" default="0.0">
  114. </member>
  115. <member name="ray_pickable" type="bool" setter="set_ray_pickable" getter="is_ray_pickable" default="true">
  116. If [code]true[/code], the [SoftDynamicBody3D] will respond to [RayCast3D]s.
  117. </member>
  118. <member name="simulation_precision" type="int" setter="set_simulation_precision" getter="get_simulation_precision" default="5">
  119. Increasing this value will improve the resulting simulation, but can affect performance. Use with care.
  120. </member>
  121. <member name="total_mass" type="float" setter="set_total_mass" getter="get_total_mass" default="1.0">
  122. The SoftDynamicBody3D's mass.
  123. </member>
  124. </members>
  125. <constants>
  126. <constant name="DISABLE_MODE_REMOVE" value="0" enum="DisableMode">
  127. When [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED], remove from the physics simulation to stop all physics interactions with this [SoftDynamicBody3D].
  128. Automatically re-added to the physics simulation when the [Node] is processed again.
  129. </constant>
  130. <constant name="DISABLE_MODE_KEEP_ACTIVE" value="1" enum="DisableMode">
  131. When [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED], do not affect the physics simulation.
  132. </constant>
  133. </constants>
  134. </class>