diff options
author | MrSwedish <mrswedishfunny@gmail.com> | 2022-03-03 18:30:19 +0100 |
---|---|---|
committer | MrSwedish <mrswedishfunny@gmail.com> | 2022-03-03 20:34:29 +0100 |
commit | 97c5fd17a771ec216cbc510e97db7a8f3113692a (patch) | |
tree | 2707850327e0cf14e99254188918546b9b633063 /doc | |
parent | 3f69ea4f3bcb4f234f6e62909a79bdee221608a9 (diff) |
Add linear_velocity and angular_velocity to PhysicalBone3D
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/PhysicalBone3D.xml | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/classes/PhysicalBone3D.xml b/doc/classes/PhysicalBone3D.xml index e7c702aefb..7e8cc91766 100644 --- a/doc/classes/PhysicalBone3D.xml +++ b/doc/classes/PhysicalBone3D.xml @@ -7,6 +7,13 @@ <tutorials> </tutorials> <methods> + <method name="_integrate_forces" qualifiers="virtual"> + <return type="void" /> + <argument index="0" name="state" type="PhysicsDirectBodyState3D" /> + <description> + Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default, it works in addition to the usual physics behavior, but the [member custom_integrator] property allows you to disable the default behavior and do fully custom force integration for a body. + </description> + </method> <method name="apply_central_impulse"> <return type="void" /> <argument index="0" name="impulse" type="Vector3" /> @@ -44,6 +51,9 @@ <member name="angular_damp_mode" type="int" setter="set_angular_damp_mode" getter="get_angular_damp_mode" enum="PhysicalBone3D.DampMode" default="0"> Defines how [member angular_damp] is applied. See [enum DampMode] for possible values. </member> + <member name="angular_velocity" type="Vector3" setter="set_angular_velocity" getter="get_angular_velocity" default="Vector3(0, 0, 0)"> + The PhysicalBone3D's rotational velocity in [i]radians[/i] per second. + </member> <member name="body_offset" type="Transform3D" setter="set_body_offset" getter="get_body_offset" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)"> Sets the body's transform. </member> @@ -53,6 +63,9 @@ <member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep" default="true"> If [code]true[/code], the body is deactivated when there is no movement, so it will not take part in the simulation until it is awakened by an external force. </member> + <member name="custom_integrator" type="bool" setter="set_use_custom_integrator" getter="is_using_custom_integrator" default="false"> + If [code]true[/code], internal force integration will be disabled (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the [method _integrate_forces] function, if defined. + </member> <member name="friction" type="float" setter="set_friction" getter="get_friction" default="1.0"> The body's friction, from [code]0[/code] (frictionless) to [code]1[/code] (max friction). </member> @@ -75,6 +88,9 @@ <member name="linear_damp_mode" type="int" setter="set_linear_damp_mode" getter="get_linear_damp_mode" enum="PhysicalBone3D.DampMode" default="0"> Defines how [member linear_damp] is applied. See [enum DampMode] for possible values. </member> + <member name="linear_velocity" type="Vector3" setter="set_linear_velocity" getter="get_linear_velocity" default="Vector3(0, 0, 0)"> + The body's linear velocity in units per second. Can be used sporadically, but [b]don't set this every frame[/b], because physics may run in another thread and runs at a different granularity. Use [method _integrate_forces] as your process loop for precise control of the body state. + </member> <member name="mass" type="float" setter="set_mass" getter="get_mass" default="1.0"> The body's mass. </member> |