Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
Joint2D
繼承: Node2D < CanvasItem < Node < Object
被繼承: DampedSpringJoint2D, GrooveJoint2D, PinJoint2D
所有 2D 物理關節的抽象基底類別。
說明
Abstract base class for all joints in 2D physics. 2D joints bind together two physics bodies (node_a and node_b) and apply a constraint.
屬性
|
||
|
||
|
||
|
方法
get_rid() const |
屬性說明
When node_a and node_b move in different directions the bias controls how fast the joint pulls them back to their original position. The lower the bias the more the two bodies can pull on the joint.
When set to 0, the default value from ProjectSettings.physics/2d/solver/default_constraint_bias is used.
bool disable_collision = true 🔗
If true, the two bodies bound together do not collide with each other.
NodePath node_a = NodePath("") 🔗
Path to the first body (A) attached to the joint. The node must inherit PhysicsBody2D.
NodePath node_b = NodePath("") 🔗
Path to the second body (B) attached to the joint. The node must inherit PhysicsBody2D.
方法說明
Returns the joint's internal RID from the PhysicsServer2D.