主题
RodConstraint
RodConstraint 描述两个已绑定 Attachment 之间保持固定距离的杆约束。
概览
RodConstraint 描述两个已绑定 Attachment 之间保持固定距离的杆约束。
继承自
Unit;可通过World:CreateUnit("RodConstraint", ...)创建;返回单个单位
属性
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
Enabled | Bool | true | 控制约束是否启用。 |
Attachment0 | Attachment | - | RodConstraint 的第一个连接端点,类型为 Attachment,用于指定杆状约束其中一端所依附的附着点对象。 |
Attachment1 | Attachment | - | RodConstraint 的第二个连接端点,类型为 Attachment,用于指定杆状约束另一端所依附的附着点对象。 |
Length | Float | 5.0 | 杆的长度,以空间单位表示。 |
LimitsEnabled | Bool | false | 是否启用端部角度限制;当前该配置仅存储,暂不生效。 |
LimitAngle0 | Float | 0.0 | Attachment0 端的角度限制,单位为度;当前该配置仅存储,暂不生效。 |
LimitAngle1 | Float | 0.0 | Attachment1 端的角度限制,单位为度;当前该配置仅存储,暂不生效。 |
Thickness | Float | 0.1 | 约束可视化显示的粗细;当前该配置仅存储,暂不生效。 |
Active | Bool | false | 指示 RodConstraint 是否处于激活状态。 |
CurrentDistance | Float | 0.0 | 当前两个 Attachment 之间的实际距离,以空间单位表示。 |
