Add functions to apply impulse and force to SoftBody on GodotPhysics and JoltPhysics

This commit is contained in:
PiCode
2025-05-13 23:49:28 +03:00
parent 209a446e36
commit fe3aaa2ae3
19 changed files with 303 additions and 0 deletions

View File

@@ -19,6 +19,38 @@
Adds a body to the list of bodies that this body can't collide with.
</description>
</method>
<method name="apply_central_force">
<return type="void" />
<param index="0" name="force" type="Vector3" />
<description>
Distributes and applies a force to all points. A force is time dependent and meant to be applied every physics update.
</description>
</method>
<method name="apply_central_impulse">
<return type="void" />
<param index="0" name="impulse" type="Vector3" />
<description>
Distributes and applies an impulse to all points.
An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
</description>
</method>
<method name="apply_force">
<return type="void" />
<param index="0" name="point_index" type="int" />
<param index="1" name="force" type="Vector3" />
<description>
Applies a force to a point. A force is time dependent and meant to be applied every physics update.
</description>
</method>
<method name="apply_impulse">
<return type="void" />
<param index="0" name="point_index" type="int" />
<param index="1" name="impulse" type="Vector3" />
<description>
Applies an impulse to a point.
An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise).
</description>
</method>
<method name="get_collision_exceptions">
<return type="PhysicsBody3D[]" />
<description>