0.2.0-dev Download ZIP
75 lines ·3.7 KB Raw
| 1 | <?xml version="1.0" encoding="UTF-8" ?> |
| 2 | <class name="ConeTwistJoint3D" inherits="Joint3D" api_type="core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> |
| 3 | <brief_description> |
| 4 | A physics joint that connects two 3D physics bodies in a way that simulates a ball-and-socket joint. |
| 5 | </brief_description> |
| 6 | <description> |
| 7 | 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. |
| 8 | </description> |
| 9 | <tutorials> |
| 10 | </tutorials> |
| 11 | <methods> |
| 12 | <method name="get_param" qualifiers="const"> |
| 13 | <return type="float" /> |
| 14 | <param index="0" name="param" type="int" enum="ConeTwistJoint3D.Param" /> |
| 15 | <description> |
| 16 | Returns the value of the specified parameter. |
| 17 | </description> |
| 18 | </method> |
| 19 | <method name="set_param"> |
| 20 | <return type="void" /> |
| 21 | <param index="0" name="param" type="int" enum="ConeTwistJoint3D.Param" /> |
| 22 | <param index="1" name="value" type="float" /> |
| 23 | <description> |
| 24 | Sets the value of the specified parameter. |
| 25 | </description> |
| 26 | </method> |
| 27 | </methods> |
| 28 | <members> |
| 29 | <member name="bias" type="float" setter="set_param" getter="get_param" default="0.3"> |
| 30 | The speed with which the swing or twist will take place. |
| 31 | The higher, the faster. |
| 32 | </member> |
| 33 | <member name="relaxation" type="float" setter="set_param" getter="get_param" default="1.0"> |
| 34 | Defines, how fast the swing- and twist-speed-difference on both sides gets synced. |
| 35 | </member> |
| 36 | <member name="softness" type="float" setter="set_param" getter="get_param" default="0.8"> |
| 37 | The ease with which the joint starts to twist. If it's too low, it takes more force to start twisting the joint. |
| 38 | </member> |
| 39 | <member name="swing_span" type="float" setter="set_param" getter="get_param" default="0.7853982"> |
| 40 | Swing is rotation from side to side, around the axis perpendicular to the twist axis. |
| 41 | The swing span defines, how much rotation will not get corrected along the swing axis. |
| 42 | Could be defined as looseness in the [ConeTwistJoint3D]. |
| 43 | If below 0.05, this behavior is locked. |
| 44 | </member> |
| 45 | <member name="twist_span" type="float" setter="set_param" getter="get_param" default="3.1415927"> |
| 46 | Twist is the rotation around the twist axis, this value defined how far the joint can twist. |
| 47 | Twist is locked if below 0.05. |
| 48 | </member> |
| 49 | </members> |
| 50 | <constants> |
| 51 | <constant name="PARAM_SWING_SPAN" value="0" enum="Param"> |
| 52 | Swing is rotation from side to side, around the axis perpendicular to the twist axis. |
| 53 | The swing span defines, how much rotation will not get corrected along the swing axis. |
| 54 | Could be defined as looseness in the [ConeTwistJoint3D]. |
| 55 | If below 0.05, this behavior is locked. |
| 56 | </constant> |
| 57 | <constant name="PARAM_TWIST_SPAN" value="1" enum="Param"> |
| 58 | Twist is the rotation around the twist axis, this value defined how far the joint can twist. |
| 59 | Twist is locked if below 0.05. |
| 60 | </constant> |
| 61 | <constant name="PARAM_BIAS" value="2" enum="Param"> |
| 62 | The speed with which the swing or twist will take place. |
| 63 | The higher, the faster. |
| 64 | </constant> |
| 65 | <constant name="PARAM_SOFTNESS" value="3" enum="Param"> |
| 66 | The ease with which the joint starts to twist. If it's too low, it takes more force to start twisting the joint. |
| 67 | </constant> |
| 68 | <constant name="PARAM_RELAXATION" value="4" enum="Param"> |
| 69 | Defines, how fast the swing- and twist-speed-difference on both sides gets synced. |
| 70 | </constant> |
| 71 | <constant name="PARAM_MAX" value="5" enum="Param"> |
| 72 | Represents the size of the [enum Param] enum. |
| 73 | </constant> |
| 74 | </constants> |
| 75 | </class> |