2017-09-13 04:42:36 +08:00
<?xml version="1.0" encoding="UTF-8" ?>
2023-07-06 16:08:05 +08:00
<class name= "ConeTwistJoint3D" inherits= "Joint3D" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "../class.xsd" >
2017-09-13 04:42:36 +08:00
<brief_description >
2023-04-29 04:59:03 +08:00
A physics joint that connects two 3D physics bodies in a way that simulates a ball-and-socket joint.
2017-09-13 04:42:36 +08:00
</brief_description>
<description >
2023-04-29 04:59:03 +08:00
A physics joint that connects two 3D physics bodies in a way that simulates a ball-and-socket joint. The twist axis is initiated as the X axis of the [ConeTwistJoint3D]. Once the physics bodies swing, the twist axis is calculated as the middle of the X axes of the joint in the local space of the two physics bodies. Useful for limbs like shoulders and hips, lamps hanging off a ceiling, etc.
2017-09-13 04:42:36 +08:00
</description>
<tutorials >
</tutorials>
<methods >
2019-06-27 22:10:09 +08:00
<method name= "get_param" qualifiers= "const" >
2021-07-30 21:28:05 +08:00
<return type= "float" />
2022-08-07 02:11:48 +08:00
<param index= "0" name= "param" type= "int" enum= "ConeTwistJoint3D.Param" />
2019-06-27 22:10:09 +08:00
<description >
2023-02-28 22:06:21 +08:00
Returns the value of the specified parameter.
2019-06-27 22:10:09 +08:00
</description>
</method>
<method name= "set_param" >
2021-07-30 21:28:05 +08:00
<return type= "void" />
2022-08-07 02:11:48 +08:00
<param index= "0" name= "param" type= "int" enum= "ConeTwistJoint3D.Param" />
<param index= "1" name= "value" type= "float" />
2019-06-27 22:10:09 +08:00
<description >
2023-02-28 22:06:21 +08:00
Sets the value of the specified parameter.
2019-06-27 22:10:09 +08:00
</description>
</method>
2017-09-13 04:42:36 +08:00
</methods>
<members >
2019-06-29 18:38:01 +08:00
<member name= "bias" type= "float" setter= "set_param" getter= "get_param" default= "0.3" >
2017-10-14 18:19:03 +08:00
The speed with which the swing or twist will take place.
The higher, the faster.
2017-09-13 04:42:36 +08:00
</member>
2019-06-29 18:38:01 +08:00
<member name= "relaxation" type= "float" setter= "set_param" getter= "get_param" default= "1.0" >
2017-10-14 18:19:03 +08:00
Defines, how fast the swing- and twist-speed-difference on both sides gets synced.
2017-09-13 04:42:36 +08:00
</member>
2019-06-29 18:38:01 +08:00
<member name= "softness" type= "float" setter= "set_param" getter= "get_param" default= "0.8" >
2017-10-14 18:19:03 +08:00
The ease with which the joint starts to twist. If it's too low, it takes more force to start twisting the joint.
2017-09-13 04:42:36 +08:00
</member>
2022-08-22 17:30:48 +08:00
<member name= "swing_span" type= "float" setter= "set_param" getter= "get_param" default= "0.785398" >
2017-10-14 18:19:03 +08:00
Swing is rotation from side to side, around the axis perpendicular to the twist axis.
2019-06-27 17:10:53 +08:00
The swing span defines, how much rotation will not get corrected along the swing axis.
2020-03-31 00:22:57 +08:00
Could be defined as looseness in the [ConeTwistJoint3D].
2019-06-29 21:24:23 +08:00
If below 0.05, this behavior is locked.
2017-09-13 04:42:36 +08:00
</member>
2022-08-22 17:30:48 +08:00
<member name= "twist_span" type= "float" setter= "set_param" getter= "get_param" default= "3.14159" >
2017-10-14 18:19:03 +08:00
Twist is the rotation around the twist axis, this value defined how far the joint can twist.
Twist is locked if below 0.05.
2017-09-13 04:42:36 +08:00
</member>
</members>
<constants >
2017-11-25 06:16:30 +08:00
<constant name= "PARAM_SWING_SPAN" value= "0" enum= "Param" >
2017-10-14 18:19:03 +08:00
Swing is rotation from side to side, around the axis perpendicular to the twist axis.
2019-06-27 17:10:53 +08:00
The swing span defines, how much rotation will not get corrected along the swing axis.
2020-03-31 00:22:57 +08:00
Could be defined as looseness in the [ConeTwistJoint3D].
2019-06-29 21:24:23 +08:00
If below 0.05, this behavior is locked.
2017-09-13 04:42:36 +08:00
</constant>
2017-11-25 06:16:30 +08:00
<constant name= "PARAM_TWIST_SPAN" value= "1" enum= "Param" >
2017-10-14 18:19:03 +08:00
Twist is the rotation around the twist axis, this value defined how far the joint can twist.
Twist is locked if below 0.05.
2017-09-13 04:42:36 +08:00
</constant>
2017-11-25 06:16:30 +08:00
<constant name= "PARAM_BIAS" value= "2" enum= "Param" >
2017-10-14 18:19:03 +08:00
The speed with which the swing or twist will take place.
The higher, the faster.
2017-09-13 04:42:36 +08:00
</constant>
2017-11-25 06:16:30 +08:00
<constant name= "PARAM_SOFTNESS" value= "3" enum= "Param" >
2017-10-14 18:19:03 +08:00
The ease with which the joint starts to twist. If it's too low, it takes more force to start twisting the joint.
2017-09-13 04:42:36 +08:00
</constant>
2017-11-25 06:16:30 +08:00
<constant name= "PARAM_RELAXATION" value= "4" enum= "Param" >
2017-10-14 18:19:03 +08:00
Defines, how fast the swing- and twist-speed-difference on both sides gets synced.
2017-09-13 04:42:36 +08:00
</constant>
2017-11-25 06:16:30 +08:00
<constant name= "PARAM_MAX" value= "5" enum= "Param" >
2019-06-27 17:10:53 +08:00
Represents the size of the [enum Param] enum.
2017-09-13 04:42:36 +08:00
</constant>
</constants>
</class>