Added the 2D Joint docs
This commit is contained in:
parent
8de1dc7e9a
commit
7a6246a0bd
3 changed files with 10 additions and 0 deletions
|
@ -78,12 +78,16 @@
|
|||
</methods>
|
||||
<members>
|
||||
<member name="damping" type="float" setter="set_damping" getter="get_damping">
|
||||
The spring joint's damping ratio. A value between [code]0[/code] and [code]1[/code]. When the two bodies move into different directions the system tries to align them to the spring axis again. A high [code]damping[/code] value forces the attached bodies to align faster. Default value: [code]1[/code]
|
||||
</member>
|
||||
<member name="length" type="float" setter="set_length" getter="get_length">
|
||||
The spring joint's maximum length. The two attached bodies cannot stretch it past this value. Default value: [code]50[/code]
|
||||
</member>
|
||||
<member name="rest_length" type="float" setter="set_rest_length" getter="get_rest_length">
|
||||
When the bodies attached to the spring joint move they stretch or squash it. The joint always tries to resize towards this length. Default value: [code]0[/code]
|
||||
</member>
|
||||
<member name="stiffness" type="float" setter="set_stiffness" getter="get_stiffness">
|
||||
The higher the value, the less the bodies attached to the joint will deform it. The joint applies an opposing force to the bodies, the product of the stiffness multiplied by the size difference from its resting length. Default value: [code]20[/code]
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
|
|
|
@ -46,8 +46,10 @@
|
|||
</methods>
|
||||
<members>
|
||||
<member name="initial_offset" type="float" setter="set_initial_offset" getter="get_initial_offset">
|
||||
The body B's initial anchor position defined by the joint's origin and a local offset [member initial_offset] along the joint's y axis (along the groove). Default value: [code]25[/code]
|
||||
</member>
|
||||
<member name="length" type="float" setter="set_length" getter="get_length">
|
||||
The groove's length. The groove is from the joint's origin towards [member length] along the joint's local y axis. Default value: [code]50[/code]
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
|
|
|
@ -74,12 +74,16 @@
|
|||
</methods>
|
||||
<members>
|
||||
<member name="bias" type="float" setter="set_bias" getter="get_bias">
|
||||
When [member node_a] and [member node_b] move in different directions the [code]bias[/code] controls how fast the joint pulls them back to their original position. The lower the [code]bias[/code] the more the two bodies can pull on the joint. Default value: [code]0[/code]
|
||||
</member>
|
||||
<member name="disable_collision" type="bool" setter="set_exclude_nodes_from_collision" getter="get_exclude_nodes_from_collision">
|
||||
If [code]true[/code] [member node_a] and [member node_b] can collide. Default value: [code]false[/code].
|
||||
</member>
|
||||
<member name="node_a" type="NodePath" setter="set_node_a" getter="get_node_a">
|
||||
The first body attached to the joint. Must derive from [PhysicsBody2D].
|
||||
</member>
|
||||
<member name="node_b" type="NodePath" setter="set_node_b" getter="get_node_b">
|
||||
The second body attached to the joint. Must derive from [PhysicsBody2D].
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
|
|
Loading…
Reference in a new issue