0.2.0-dev Download ZIP
34 lines ·1.8 KB Raw
| 1 | <?xml version="1.0" encoding="UTF-8" ?> |
| 2 | <class name="Joint2D" inherits="Node2D" api_type="core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> |
| 3 | <brief_description> |
| 4 | Abstract base class for all 2D physics joints. |
| 5 | </brief_description> |
| 6 | <description> |
| 7 | Abstract base class for all joints in 2D physics. 2D joints bind together two physics bodies ([member node_a] and [member node_b]) and apply a constraint. |
| 8 | </description> |
| 9 | <tutorials> |
| 10 | </tutorials> |
| 11 | <methods> |
| 12 | <method name="get_rid" qualifiers="const"> |
| 13 | <return type="RID" /> |
| 14 | <description> |
| 15 | Returns the joint's internal [RID] from the [PhysicsServer2D]. |
| 16 | </description> |
| 17 | </method> |
| 18 | </methods> |
| 19 | <members> |
| 20 | <member name="bias" type="float" setter="set_bias" getter="get_bias" default="0.0"> |
| 21 | When [member node_a] and [member node_b] move in different directions the [member bias] controls how fast the joint pulls them back to their original position. The lower the [member bias] the more the two bodies can pull on the joint. |
| 22 | When set to [code]0[/code], the default value from [member ProjectSettings.physics/2d/solver/default_constraint_bias] is used. |
| 23 | </member> |
| 24 | <member name="disable_collision" type="bool" setter="set_exclude_nodes_from_collision" getter="get_exclude_nodes_from_collision" default="true"> |
| 25 | If [code]true[/code], the two bodies bound together do not collide with each other. |
| 26 | </member> |
| 27 | <member name="node_a" type="NodePath" setter="set_node_a" getter="get_node_a" default="NodePath("")"> |
| 28 | Path to the first body (A) attached to the joint. The node must inherit [PhysicsBody2D]. |
| 29 | </member> |
| 30 | <member name="node_b" type="NodePath" setter="set_node_b" getter="get_node_b" default="NodePath("")"> |
| 31 | Path to the second body (B) attached to the joint. The node must inherit [PhysicsBody2D]. |
| 32 | </member> |
| 33 | </members> |
| 34 | </class> |