mirror of
https://github.com/godotengine/godot.git
synced 2024-12-04 18:14:14 +00:00
b68dd2e189
This makes it easier to spot syntax errors when editing the class reference. The schema is referenced locally so validation can still work offline. Each class XML's schema conformance is also checked on GitHub Actions.
27 lines
1.6 KiB
XML
27 lines
1.6 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<class name="Joint2D" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
|
<brief_description>
|
|
Base node for all joint constraints in 2D physics.
|
|
</brief_description>
|
|
<description>
|
|
Base node for all joint constraints in 2D physics. Joints take 2 bodies and apply a custom constraint.
|
|
</description>
|
|
<tutorials>
|
|
</tutorials>
|
|
<members>
|
|
<member name="bias" type="float" setter="set_bias" getter="get_bias" default="0.0">
|
|
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.
|
|
When set to [code]0[/code], the default value from [member ProjectSettings.physics/2d/solver/default_constraint_bias] is used.
|
|
</member>
|
|
<member name="disable_collision" type="bool" setter="set_exclude_nodes_from_collision" getter="get_exclude_nodes_from_collision" default="true">
|
|
If [code]true[/code], [member node_a] and [member node_b] can not collide.
|
|
</member>
|
|
<member name="node_a" type="NodePath" setter="set_node_a" getter="get_node_a" default="NodePath("")">
|
|
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" default="NodePath("")">
|
|
The second body attached to the joint. Must derive from [PhysicsBody2D].
|
|
</member>
|
|
</members>
|
|
</class>
|