Skip to content
0.2.0-dev Download ZIP
111 lines ·5.4 KB Raw
1<?xml version="1.0" encoding="UTF-8" ?>
2<class name="HingeJoint3D" 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 restricts the rotation of a 3D physics body around an axis relative to another physics body.
5 </brief_description>
6 <description>
7 A physics joint that restricts the rotation of a 3D physics body around an axis relative to another physics body. For example, Body A can be a [StaticBody3D] representing a door hinge that a [RigidBody3D] rotates around.
8 </description>
9 <tutorials>
10 </tutorials>
11 <methods>
12 <method name="get_flag" qualifiers="const">
13 <return type="bool" />
14 <param index="0" name="flag" type="int" enum="HingeJoint3D.Flag" />
15 <description>
16 Returns the value of the specified flag.
17 </description>
18 </method>
19 <method name="get_param" qualifiers="const">
20 <return type="float" />
21 <param index="0" name="param" type="int" enum="HingeJoint3D.Param" />
22 <description>
23 Returns the value of the specified parameter.
24 </description>
25 </method>
26 <method name="set_flag">
27 <return type="void" />
28 <param index="0" name="flag" type="int" enum="HingeJoint3D.Flag" />
29 <param index="1" name="enabled" type="bool" />
30 <description>
31 If [code]true[/code], enables the specified flag.
32 </description>
33 </method>
34 <method name="set_param">
35 <return type="void" />
36 <param index="0" name="param" type="int" enum="HingeJoint3D.Param" />
37 <param index="1" name="value" type="float" />
38 <description>
39 Sets the value of the specified parameter.
40 </description>
41 </method>
42 </methods>
43 <members>
44 <member name="angular_limit/bias" type="float" setter="set_param" getter="get_param" default="0.3">
45 The speed with which the rotation across the axis perpendicular to the hinge gets corrected.
46 </member>
47 <member name="angular_limit/enable" type="bool" setter="set_flag" getter="get_flag" default="false">
48 If [code]true[/code], the hinges maximum and minimum rotation, defined by [member angular_limit/lower] and [member angular_limit/upper] has effects.
49 </member>
50 <member name="angular_limit/lower" type="float" setter="set_param" getter="get_param" default="-1.5707964">
51 The minimum rotation. Only active if [member angular_limit/enable] is [code]true[/code].
52 </member>
53 <member name="angular_limit/relaxation" type="float" setter="set_param" getter="get_param" default="1.0">
54 The lower this value, the more the rotation gets slowed down.
55 </member>
56 <member name="angular_limit/softness" type="float" setter="set_param" getter="get_param" default="0.9" deprecated="This property is never set by the engine and is kept for compatibility purposes.">
57 </member>
58 <member name="angular_limit/upper" type="float" setter="set_param" getter="get_param" default="1.5707964">
59 The maximum rotation. Only active if [member angular_limit/enable] is [code]true[/code].
60 </member>
61 <member name="motor/enable" type="bool" setter="set_flag" getter="get_flag" default="false">
62 When activated, a motor turns the hinge.
63 </member>
64 <member name="motor/max_impulse" type="float" setter="set_param" getter="get_param" default="1.0">
65 Maximum acceleration for the motor.
66 </member>
67 <member name="motor/target_velocity" type="float" setter="set_param" getter="get_param" default="1.0">
68 Target speed for the motor.
69 </member>
70 <member name="params/bias" type="float" setter="set_param" getter="get_param" default="0.3">
71 The speed with which the two bodies get pulled together when they move in different directions.
72 </member>
73 </members>
74 <constants>
75 <constant name="PARAM_BIAS" value="0" enum="Param">
76 The speed with which the two bodies get pulled together when they move in different directions.
77 </constant>
78 <constant name="PARAM_LIMIT_UPPER" value="1" enum="Param">
79 The maximum rotation. Only active if [member angular_limit/enable] is [code]true[/code].
80 </constant>
81 <constant name="PARAM_LIMIT_LOWER" value="2" enum="Param">
82 The minimum rotation. Only active if [member angular_limit/enable] is [code]true[/code].
83 </constant>
84 <constant name="PARAM_LIMIT_BIAS" value="3" enum="Param">
85 The speed with which the rotation across the axis perpendicular to the hinge gets corrected.
86 </constant>
87 <constant name="PARAM_LIMIT_SOFTNESS" value="4" enum="Param" deprecated="This property is never used by the engine and is kept for compatibility purpose.">
88 </constant>
89 <constant name="PARAM_LIMIT_RELAXATION" value="5" enum="Param">
90 The lower this value, the more the rotation gets slowed down.
91 </constant>
92 <constant name="PARAM_MOTOR_TARGET_VELOCITY" value="6" enum="Param">
93 Target speed for the motor.
94 </constant>
95 <constant name="PARAM_MOTOR_MAX_IMPULSE" value="7" enum="Param">
96 Maximum acceleration for the motor.
97 </constant>
98 <constant name="PARAM_MAX" value="8" enum="Param">
99 Represents the size of the [enum Param] enum.
100 </constant>
101 <constant name="FLAG_USE_LIMIT" value="0" enum="Flag">
102 If [code]true[/code], the hinges maximum and minimum rotation, defined by [member angular_limit/lower] and [member angular_limit/upper] has effects.
103 </constant>
104 <constant name="FLAG_ENABLE_MOTOR" value="1" enum="Flag">
105 When activated, a motor turns the hinge.
106 </constant>
107 <constant name="FLAG_MAX" value="2" enum="Flag">
108 Represents the size of the [enum Flag] enum.
109 </constant>
110 </constants>
111</class>