主题
PrismaticConstraint
PrismaticConstraint 描述两个已绑定 Attachment 之间沿单一轴向滑动的棱柱约束。
概览
PrismaticConstraint 描述两个已绑定 Attachment 之间沿单一轴向滑动的棱柱约束。
继承自
Unit;可通过World:CreateUnit("PrismaticConstraint", ...)创建;返回单个单位
属性
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
Enabled | Bool | true | 是否启用约束。 |
Attachment0 | Attachment | - | PrismaticConstraint 的 Attachment0 属性,类型为 Attachment,用于关联棱柱约束一端的附着点。它与 Attachment1 共同确定该滑动约束所连接的两个位置。 |
Attachment1 | Attachment | - | PrismaticConstraint 的 Attachment1 属性,类型为 Attachment,用于关联棱柱约束另一端的附着点。它与 Attachment0 一起界定约束连接的两个位置,是确定滑动方向的另一端参考。 |
LimitsEnabled | Bool | false | 是否启用线性移动范围限制。 |
LowerLimit | Float | 0.0 | 线性移动的最小位置,单位为空间单位。 |
UpperLimit | Float | 5.0 | 线性移动的最大位置,单位为空间单位。 |
Restitution | Float | 0.0 | 约束的弹性系数,取值范围 0 到 1。 |
ActuatorType | Int | Enums.ActuatorType.None | 驱动类型,决定约束的运动方式。 |
Velocity | Float | 0.0 | Motor 模式下的目标移动速度,单位为空间单位/秒。 |
MotorMaxForce | Float | 0.0 | Motor 模式下的最大驱动力。 |
MotorMaxAcceleration | Float | 500000.0 | Motor 模式下的最大加速度。 |
TargetPosition | Float | 0.0 | Servo 模式下的目标位置,单位为空间单位。 |
Speed | Float | 0.0 | Servo 模式下的目标移动速度,单位为空间单位/秒。 |
ServoMaxForce | Float | 0.0 | Servo 模式下的最大驱动力。 |
LinearResponsiveness | Float | 0.0 | Servo 模式下的线性响应系数。 |
Active | Bool | false | 当前约束是否处于激活状态。 |
CurrentPosition | Float | 0.0 | 当前滑动位置,单位为空间单位。 |
