Skip to content

PrismaticConstraint ​

PrismaticConstraint 描述两个已绑定 Attachment 之间沿单一轴向滑动的棱柱约束。

概览 ​

PrismaticConstraint 描述两个已绑定 Attachment 之间沿单一轴向滑动的棱柱约束。

继承自 Unit;可通过 World:CreateUnit("PrismaticConstraint", ...) 创建;返回单个单位

属性 ​

名称类型默认值说明
EnabledBooltrue是否启用约束。
Attachment0Attachment-PrismaticConstraint 的 Attachment0 属性,类型为 Attachment,用于关联棱柱约束一端的附着点。它与 Attachment1 共同确定该滑动约束所连接的两个位置。
Attachment1Attachment-PrismaticConstraint 的 Attachment1 属性,类型为 Attachment,用于关联棱柱约束另一端的附着点。它与 Attachment0 一起界定约束连接的两个位置,是确定滑动方向的另一端参考。
LimitsEnabledBoolfalse是否启用线性移动范围限制。
LowerLimitFloat0.0线性移动的最小位置,单位为空间单位。
UpperLimitFloat5.0线性移动的最大位置,单位为空间单位。
RestitutionFloat0.0约束的弹性系数,取值范围 0 到 1。
ActuatorTypeIntEnums.ActuatorType.None驱动类型,决定约束的运动方式。
VelocityFloat0.0Motor 模式下的目标移动速度,单位为空间单位/秒。
MotorMaxForceFloat0.0Motor 模式下的最大驱动力。
MotorMaxAccelerationFloat500000.0Motor 模式下的最大加速度。
TargetPositionFloat0.0Servo 模式下的目标位置,单位为空间单位。
SpeedFloat0.0Servo 模式下的目标移动速度,单位为空间单位/秒。
ServoMaxForceFloat0.0Servo 模式下的最大驱动力。
LinearResponsivenessFloat0.0Servo 模式下的线性响应系数。
ActiveBoolfalse当前约束是否处于激活状态。
CurrentPositionFloat0.0当前滑动位置,单位为空间单位。