2018-05-12 07:38:00 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
2022-02-14 13:18:53 +00:00
<class name= "PhysicalBone3D" inherits= "PhysicsBody3D" version= "4.0" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "../class.xsd" >
2018-05-12 07:38:00 +00:00
<brief_description >
</brief_description>
<description >
</description>
<tutorials >
</tutorials>
<methods >
2022-03-03 17:30:19 +00:00
<method name= "_integrate_forces" qualifiers= "virtual" >
<return type= "void" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "state" type= "PhysicsDirectBodyState3D" />
2022-03-03 17:30:19 +00:00
<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>
2019-12-17 10:43:07 +00:00
<method name= "apply_central_impulse" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "impulse" type= "Vector3" />
2019-12-17 10:43:07 +00:00
<description >
</description>
</method>
<method name= "apply_impulse" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "impulse" type= "Vector3" />
<param index= "1" name= "position" type= "Vector3" default= "Vector3(0, 0, 0)" />
2019-12-17 10:43:07 +00:00
<description >
</description>
</method>
2018-08-20 22:35:30 +00:00
<method name= "get_bone_id" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "int" />
2018-08-20 22:35:30 +00:00
<description >
</description>
</method>
2018-05-28 12:53:15 +00:00
<method name= "get_simulate_physics" >
2021-07-30 13:28:05 +00:00
<return type= "bool" />
2018-05-28 12:53:15 +00:00
<description >
</description>
</method>
2018-05-12 07:38:00 +00:00
<method name= "is_simulating_physics" >
2021-07-30 13:28:05 +00:00
<return type= "bool" />
2018-05-12 07:38:00 +00:00
<description >
</description>
</method>
</methods>
<members >
2020-04-14 17:59:53 +00:00
<member name= "angular_damp" type= "float" setter= "set_angular_damp" getter= "get_angular_damp" default= "0.0" >
Damps the body's rotation. By default, the body will use the [b]Default Angular Damp[/b] in [b]Project > Project Settings > Physics > 3d[/b] or any value override set by an [Area3D] the body is in. Depending on [member angular_damp_mode], you can set [member angular_damp] to be added to or to replace the body's damping value.
See [member ProjectSettings.physics/3d/default_angular_damp] for more details about damping.
</member>
<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.
2020-03-26 11:59:21 +00:00
</member>
2022-03-03 17:30:19 +00:00
<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>
2019-09-24 17:45:03 +00:00
<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)" >
2020-03-26 11:59:21 +00:00
Sets the body's transform.
2018-05-12 07:38:00 +00:00
</member>
2019-06-29 10:38:01 +00:00
<member name= "bounce" type= "float" setter= "set_bounce" getter= "get_bounce" default= "0.0" >
2020-03-26 11:59:21 +00:00
The body's bounciness. Values range from [code]0[/code] (no bounce) to [code]1[/code] (full bounciness).
</member>
<member name= "can_sleep" type= "bool" setter= "set_can_sleep" getter= "is_able_to_sleep" default= "true" >
2021-03-18 11:04:28 +00:00
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.
2018-05-12 07:38:00 +00:00
</member>
2022-03-03 17:30:19 +00:00
<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>
2019-06-29 10:38:01 +00:00
<member name= "friction" type= "float" setter= "set_friction" getter= "get_friction" default= "1.0" >
2020-03-26 11:59:21 +00:00
The body's friction, from [code]0[/code] (frictionless) to [code]1[/code] (max friction).
2018-05-12 07:38:00 +00:00
</member>
2019-06-29 10:38:01 +00:00
<member name= "gravity_scale" type= "float" setter= "set_gravity_scale" getter= "get_gravity_scale" default= "1.0" >
2020-03-26 11:59:21 +00:00
This is multiplied by the global 3D gravity setting found in [b]Project > Project Settings > Physics > 3d[/b] to produce the body's gravity. For example, a value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object.
2018-05-12 07:38:00 +00:00
</member>
2019-09-24 17:45:03 +00:00
<member name= "joint_offset" type= "Transform3D" setter= "set_joint_offset" getter= "get_joint_offset" default= "Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)" >
2020-03-26 11:59:21 +00:00
Sets the joint's transform.
</member>
Fix editor suffixes and degrees conversion
* Functions to convert to/from degrees are all gone. Conversion is done by the editor.
* Use PROPERTY_HINT_ANGLE instead of PROPERTY_HINT_RANGE to edit radian angles in degrees.
* Added possibility to add suffixes to range properties, use "min,max[,step][,suffix:<something>]" example "0,100,1,suffix:m"
* In general, can add suffixes for EditorSpinSlider
Not covered by this PR, will have to be addressed by future ones:
* Ability to switch radians/degrees in the inspector for angle properties (if actually wanted).
* Animations previously made will most likely break, need to add a way to make old ones compatible.
* Only added a "px" suffix to 2D position and a "m" one to 3D position, someone needs to go through the rest of the engine and add all remaining suffixes.
* Likely also need to track down usage of EditorSpinSlider outside properties to add suffixes to it too.
2021-06-29 19:42:12 +00:00
<member name= "joint_rotation" type= "Vector3" setter= "set_joint_rotation" getter= "get_joint_rotation" default= "Vector3(0, 0, 0)" >
2020-03-26 11:59:21 +00:00
Sets the joint's rotation in radians.
</member>
2020-03-30 16:22:57 +00:00
<member name= "joint_type" type= "int" setter= "set_joint_type" getter= "get_joint_type" enum= "PhysicalBone3D.JointType" default= "0" >
2020-03-26 11:59:21 +00:00
Sets the joint type. See [enum JointType] for possible values.
</member>
2020-04-14 17:59:53 +00:00
<member name= "linear_damp" type= "float" setter= "set_linear_damp" getter= "get_linear_damp" default= "0.0" >
Damps the body's movement. By default, the body will use the [b]Default Linear Damp[/b] in [b]Project > Project Settings > Physics > 3d[/b] or any value override set by an [Area3D] the body is in. Depending on [member linear_damp_mode], you can set [member linear_damp] to be added to or to replace the body's damping value.
See [member ProjectSettings.physics/3d/default_linear_damp] for more details about damping.
</member>
<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.
2018-05-12 07:38:00 +00:00
</member>
2022-03-03 17:30:19 +00:00
<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>
2019-06-29 10:38:01 +00:00
<member name= "mass" type= "float" setter= "set_mass" getter= "get_mass" default= "1.0" >
2020-03-26 11:59:21 +00:00
The body's mass.
2018-05-12 07:38:00 +00:00
</member>
</members>
<constants >
2020-04-14 17:59:53 +00:00
<constant name= "DAMP_MODE_COMBINE" value= "0" enum= "DampMode" >
In this mode, the body's damping value is added to any value set in areas or the default value.
</constant>
<constant name= "DAMP_MODE_REPLACE" value= "1" enum= "DampMode" >
In this mode, the body's damping value replaces any value set in areas or the default value.
</constant>
2018-05-12 07:38:00 +00:00
<constant name= "JOINT_TYPE_NONE" value= "0" enum= "JointType" >
</constant>
<constant name= "JOINT_TYPE_PIN" value= "1" enum= "JointType" >
</constant>
<constant name= "JOINT_TYPE_CONE" value= "2" enum= "JointType" >
</constant>
<constant name= "JOINT_TYPE_HINGE" value= "3" enum= "JointType" >
</constant>
<constant name= "JOINT_TYPE_SLIDER" value= "4" enum= "JointType" >
</constant>
<constant name= "JOINT_TYPE_6DOF" value= "5" enum= "JointType" >
</constant>
</constants>
</class>