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= "HingeJoint3D" 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 restricts the rotation of a 3D physics body around an axis relative to another physics body.
2017-09-13 04:42:36 +08:00
</brief_description>
<description >
2023-04-29 04:59:03 +08:00
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.
2017-09-13 04:42:36 +08:00
</description>
<tutorials >
</tutorials>
<methods >
2019-06-27 22:10:09 +08:00
<method name= "get_flag" qualifiers= "const" >
2021-07-30 21:28:05 +08:00
<return type= "bool" />
2022-08-07 02:11:48 +08:00
<param index= "0" name= "flag" type= "int" enum= "HingeJoint3D.Flag" />
2019-06-27 22:10:09 +08:00
<description >
2020-03-04 02:21:21 +08:00
Returns the value of the specified flag.
2019-06-27 22:10:09 +08:00
</description>
</method>
<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= "HingeJoint3D.Param" />
2019-06-27 22:10:09 +08:00
<description >
2020-03-04 02:21:21 +08:00
Returns the value of the specified parameter.
2019-06-27 22:10:09 +08:00
</description>
</method>
<method name= "set_flag" >
2021-07-30 21:28:05 +08:00
<return type= "void" />
2022-08-07 02:11:48 +08:00
<param index= "0" name= "flag" type= "int" enum= "HingeJoint3D.Flag" />
<param index= "1" name= "enabled" type= "bool" />
2019-06-27 22:10:09 +08:00
<description >
2020-03-04 02:21:21 +08:00
If [code]true[/code], enables the specified flag.
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= "HingeJoint3D.Param" />
<param index= "1" name= "value" type= "float" />
2019-06-27 22:10:09 +08:00
<description >
2020-03-04 02:21: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= "angular_limit/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 rotation across the axis perpendicular to the hinge gets corrected.
2017-09-13 04:42:36 +08:00
</member>
2019-06-29 18:38:01 +08:00
<member name= "angular_limit/enable" type= "bool" setter= "set_flag" getter= "get_flag" default= "false" >
2018-12-20 20:46:54 +08:00
If [code]true[/code], the hinges maximum and minimum rotation, defined by [member angular_limit/lower] and [member angular_limit/upper] has effects.
2017-09-13 04:42:36 +08:00
</member>
2022-08-22 17:30:48 +08:00
<member name= "angular_limit/lower" type= "float" setter= "set_param" getter= "get_param" default= "-1.5708" >
2019-06-22 07:04:47 +08:00
The minimum rotation. Only active if [member angular_limit/enable] is [code]true[/code].
2017-09-13 04:42:36 +08:00
</member>
2019-06-29 18:38:01 +08:00
<member name= "angular_limit/relaxation" type= "float" setter= "set_param" getter= "get_param" default= "1.0" >
2017-10-14 18:19:03 +08:00
The lower this value, the more the rotation gets slowed down.
2017-09-13 04:42:36 +08:00
</member>
2024-04-25 06:15:21 +08:00
<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." >
2017-09-13 04:42:36 +08:00
</member>
2022-08-22 17:30:48 +08:00
<member name= "angular_limit/upper" type= "float" setter= "set_param" getter= "get_param" default= "1.5708" >
2019-06-22 07:04:47 +08:00
The maximum rotation. Only active if [member angular_limit/enable] is [code]true[/code].
2017-09-13 04:42:36 +08:00
</member>
2019-06-29 18:38:01 +08:00
<member name= "motor/enable" type= "bool" setter= "set_flag" getter= "get_flag" default= "false" >
2017-10-14 18:19:03 +08:00
When activated, a motor turns the hinge.
2017-09-13 04:42:36 +08:00
</member>
2019-06-29 18:38:01 +08:00
<member name= "motor/max_impulse" type= "float" setter= "set_param" getter= "get_param" default= "1.0" >
2017-10-14 18:19:03 +08:00
Maximum acceleration for the motor.
2017-09-13 04:42:36 +08:00
</member>
2019-06-29 18:38:01 +08:00
<member name= "motor/target_velocity" type= "float" setter= "set_param" getter= "get_param" default= "1.0" >
2017-10-14 18:19:03 +08:00
Target speed for the motor.
2017-09-13 04:42:36 +08:00
</member>
2019-06-29 18:38:01 +08:00
<member name= "params/bias" type= "float" setter= "set_param" getter= "get_param" default= "0.3" >
2018-01-19 04:37:17 +08:00
The speed with which the two bodies get pulled together when they move in different directions.
2017-09-13 04:42:36 +08:00
</member>
</members>
<constants >
2017-11-25 06:16:30 +08:00
<constant name= "PARAM_BIAS" value= "0" enum= "Param" >
2018-01-19 04:37:17 +08:00
The speed with which the two bodies get pulled together when they move in different directions.
2017-09-13 04:42:36 +08:00
</constant>
2017-11-25 06:16:30 +08:00
<constant name= "PARAM_LIMIT_UPPER" value= "1" enum= "Param" >
2019-06-22 07:04:47 +08:00
The maximum rotation. Only active if [member angular_limit/enable] is [code]true[/code].
2017-09-13 04:42:36 +08:00
</constant>
2017-11-25 06:16:30 +08:00
<constant name= "PARAM_LIMIT_LOWER" value= "2" enum= "Param" >
2019-06-22 07:04:47 +08:00
The minimum rotation. Only active if [member angular_limit/enable] is [code]true[/code].
2017-09-13 04:42:36 +08:00
</constant>
2017-11-25 06:16:30 +08:00
<constant name= "PARAM_LIMIT_BIAS" value= "3" enum= "Param" >
2017-10-14 18:19:03 +08:00
The speed with which the rotation across the axis perpendicular to the hinge gets corrected.
2017-09-13 04:42:36 +08:00
</constant>
2024-04-25 06:15:21 +08:00
<constant name= "PARAM_LIMIT_SOFTNESS" value= "4" enum= "Param" deprecated= "This property is never used by the engine and is kept for compatibility purpose." >
2017-09-13 04:42:36 +08:00
</constant>
2017-11-25 06:16:30 +08:00
<constant name= "PARAM_LIMIT_RELAXATION" value= "5" enum= "Param" >
2017-10-14 18:19:03 +08:00
The lower this value, the more the rotation gets slowed down.
2017-09-13 04:42:36 +08:00
</constant>
2017-11-25 06:16:30 +08:00
<constant name= "PARAM_MOTOR_TARGET_VELOCITY" value= "6" enum= "Param" >
2017-10-14 18:19:03 +08:00
Target speed for the motor.
2017-09-13 04:42:36 +08:00
</constant>
2017-11-25 06:16:30 +08:00
<constant name= "PARAM_MOTOR_MAX_IMPULSE" value= "7" enum= "Param" >
2017-10-14 18:19:03 +08:00
Maximum acceleration for the motor.
2017-09-13 04:42:36 +08:00
</constant>
2017-11-25 06:16:30 +08:00
<constant name= "PARAM_MAX" value= "8" 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>
2017-11-25 06:16:30 +08:00
<constant name= "FLAG_USE_LIMIT" value= "0" enum= "Flag" >
2018-12-20 20:46:54 +08:00
If [code]true[/code], the hinges maximum and minimum rotation, defined by [member angular_limit/lower] and [member angular_limit/upper] has effects.
2017-09-13 04:42:36 +08:00
</constant>
2017-11-25 06:16:30 +08:00
<constant name= "FLAG_ENABLE_MOTOR" value= "1" enum= "Flag" >
2017-10-14 18:19:03 +08:00
When activated, a motor turns the hinge.
2017-09-13 04:42:36 +08:00
</constant>
2017-11-25 06:16:30 +08:00
<constant name= "FLAG_MAX" value= "2" enum= "Flag" >
2019-06-27 17:10:53 +08:00
Represents the size of the [enum Flag] enum.
2017-09-13 04:42:36 +08:00
</constant>
</constants>
</class>