主题
PrismaticConstraint
PrismaticConstraint 描述两个已绑定 Attachment 之间沿单一轴向滑动的棱柱约束。
概览
PrismaticConstraint 描述两个已绑定 Attachment 之间沿单一轴向滑动的棱柱约束。
继承自
Unit;可通过World:CreateUnit("PrismaticConstraint", ...)创建;返回单个单位
属性
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
Enabled | Bool | true | 是否启用约束。 |
Attachment0 | Attachment | - | PrismaticConstraint(棱柱约束)连接关系中的第一个附件。该属性用于指定约束这一端所绑定的 Attachment 单位,与 Attachment1 共同构成约束两端与部件之间的连接关系。 |
Attachment1 | Attachment | - | PrismaticConstraint(棱柱约束)连接关系中的第二个附件。该属性用于指定约束另一端所绑定的 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 | 当前滑动位置,单位为空间单位。 |
