0.2.0-dev Download ZIP
39 lines ·2.8 KB Raw
| 1 | <?xml version="1.0" encoding="UTF-8" ?> |
| 2 | <class name="Joint3D" inherits="Node3D" 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 3D physics joints. |
| 5 | </brief_description> |
| 6 | <description> |
| 7 | Abstract base class for all joints in 3D physics. 3D joints bind together two physics bodies ([member node_a] and [member node_b]) and apply a constraint. If only one body is defined, it is attached to a fixed [StaticBody3D] without collision shapes. |
| 8 | </description> |
| 9 | <tutorials> |
| 10 | <link title="3D Truck Town Demo">https://store.godotengine.org/asset/godot-foundation/truck-town-demo/</link> |
| 11 | </tutorials> |
| 12 | <methods> |
| 13 | <method name="get_rid" qualifiers="const"> |
| 14 | <return type="RID" /> |
| 15 | <description> |
| 16 | Returns the joint's internal [RID] from the [PhysicsServer3D]. |
| 17 | </description> |
| 18 | </method> |
| 19 | </methods> |
| 20 | <members> |
| 21 | <member name="exclude_nodes_from_collision" type="bool" setter="set_exclude_nodes_from_collision" getter="get_exclude_nodes_from_collision" default="true"> |
| 22 | If [code]true[/code], the two bodies bound together do not collide with each other. |
| 23 | </member> |
| 24 | <member name="node_a" type="NodePath" setter="set_node_a" getter="get_node_a" default="NodePath("")"> |
| 25 | Path to the first node (A) attached to the joint. The node must inherit [PhysicsBody3D]. |
| 26 | If left empty and [member node_b] is set, the body is attached to a fixed [StaticBody3D] without collision shapes. |
| 27 | </member> |
| 28 | <member name="node_b" type="NodePath" setter="set_node_b" getter="get_node_b" default="NodePath("")"> |
| 29 | Path to the second node (B) attached to the joint. The node must inherit [PhysicsBody3D]. |
| 30 | If left empty and [member node_a] is set, the body is attached to a fixed [StaticBody3D] without collision shapes. |
| 31 | </member> |
| 32 | <member name="solver_priority" type="int" setter="set_solver_priority" getter="get_solver_priority" default="1"> |
| 33 | The priority specifies how accurately a joint is solved. Generally, higher values improve accuracy. This has very different implementations between Godot Physics and Jolt Physics: |
| 34 | [b]Godot Physics:[/b] [i]Values above 1 have a performance impact[/i]. Joint is solved [code]max(1, solver_priority) * iterations[/code] times. A value of [code]4[/code] would solve the same joint [i]4× additional times per physics step[/i]. |
| 35 | [b]Jolt Physics:[/b] Aside from sorting the joints, there is no performance impact with higher values. Joints with [i]high[/i] priorities are solved [i]later[/i]. A value of [code]4[/code] would solve [i]after priorities of 0, 1, 2, and 3[/i]. Later joints have the final say between the two bodies they connect. |
| 36 | Negative values are not allowed and will be silently [code]max(0, solver_priority)[/code] when set. |
| 37 | </member> |
| 38 | </members> |
| 39 | </class> |