Direct access object to a physics body in the [PhysicsServer].
</brief_description>
<description>
Provides direct access to a physics body in the [PhysicsServer], allowing safe changes to physics properties. This object is passed via the direct state callback of rigid/character bodies, and is intended for changing the direct state of that body. See [method RigidBody._integrate_forces].
Adds a constant directional force without affecting rotation.
This is equivalent to [code]add_force(force, Vector3(0,0,0))[/code].
</description>
</method>
<methodname="add_force">
<returntype="void"/>
<argumentindex="0"name="force"type="Vector3"/>
<argumentindex="1"name="position"type="Vector3"/>
<description>
Adds a positioned force to the body. Both the force and the offset from the body origin are in global coordinates.
</description>
</method>
<methodname="add_torque">
<returntype="void"/>
<argumentindex="0"name="torque"type="Vector3"/>
<description>
Adds a constant rotational force without affecting position.
</description>
</method>
<methodname="apply_central_impulse">
<returntype="void"/>
<argumentindex="0"name="j"type="Vector3"/>
<description>
Applies a single directional impulse without affecting rotation.
This is equivalent to [code]apply_impulse(Vector3(0, 0, 0), impulse)[/code].
</description>
</method>
<methodname="apply_impulse">
<returntype="void"/>
<argumentindex="0"name="position"type="Vector3"/>
<argumentindex="1"name="j"type="Vector3"/>
<description>
Applies a positioned impulse to the body. 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. The position uses the rotation of the global coordinate system, but is centered at the object's origin.
</description>
</method>
<methodname="apply_torque_impulse">
<returntype="void"/>
<argumentindex="0"name="j"type="Vector3"/>
<description>
Apply a torque impulse (which will be affected by the body mass and shape). This will rotate the body around the vector [code]j[/code] passed as parameter.