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...
PinJoint2D
继承: Joint2D < Node2D < CanvasItem < Node < Object
将两个 2D 物理体通过单点进行连接的物理关节,能够让它们自由旋转。
描述
将两个 2D 物理体通过单点进行连接的物理关节,能够让它们自由旋转。例如可以将 RigidBody2D 连接到 StaticBody2D 上,从而创建钟摆或跷跷板。
属性
|
||
|
||
|
||
|
||
|
||
|
属性说明
bool angular_limit_enabled = false
🔗
如果为 true
,则应用由 angular_limit_lower 和 angular_limit_upper 定义的销的最大和最小旋转。
float angular_limit_lower = 0.0
🔗
最小的旋转量。只有在 angular_limit_enabled 为 true
时才有效。
float angular_limit_upper = 0.0
🔗
最大的旋转量。只有在 angular_limit_enabled 为 true
时才有效。
激活后,马达会转动该销。
float motor_target_velocity = 0.0
🔗
马达的目标速度。单位为弧度每秒。
这个值越高,与被牵制的两个物体之间的的联系就越灵活。