一個 PrismaticConstraint 創建一個剛性接頭在兩個 Attachments 之間,允許它們沿著一個軸滑動,但不能旋轉。這約束了附件,使它們的 X 軸共線但指向相反方向。它還約束了附件,使它們的 Y 軸平行。
此約束繼承了許多來自 SlidingBallConstraint 的屬性,包括 ActuatorType、LimitsEnabled、Velocity 等等。請參考 SlidingBallConstraint 獲取有關配置 PrismaticConstraint 的詳細信息。
在配置此約束時,學習 Roblox Units 可能會有所幫助,以了解 Roblox 單位如何與公制單位相對應。
概要
屬性
屬性 繼承自 SlidingBallConstraint屬性
設置 SlidingBallConstraint 的移動是否受到驅動,以及如果是的話,採用何種驅動方式。
約束的 Attachments 之間的當前偏移量。
設置 SlidingBallConstraint 是否將限制移動範圍。
指定線性伺服馬達達到 TargetPosition 的「銳利度」。
如果 LimitsEnabled 為真,則 Attachment0 沿 X 軸的下限位置限制。
當 ActuatorType 設置為 Motor 時,約束的最大加速度,因為約束嘗試達到其期望的 Velocity。
當 ActuatorType 設置為 Motor 時,約束的最大力量,因為約束嘗試達到其期望的 Velocity。
當約束的 Attachments 到達由 UpperLimit 和 LowerLimit 指定的範圍的末端時,假設 LimitsEnabled 設置為真,則約束的彈性。
當 ActuatorType 設置為 Servo 時,約束的最大力量,因為約束嘗試達到其期望的 Speed。
約束的可視化大小。
當 ActuatorType 設置為 Servo 時,約束的期望速度,因為約束朝向其 TargetPosition 移動。以每秒 studs 測量。
當 ActuatorType 設置為 Servo 時,約束的嘗試目標位置。以 studs 測量。
如果 LimitsEnabled 為真,則 Attachment0 沿 X 軸的上限位置限制。
當 ActuatorType 設置為 Motor 時,約束的嘗試速度。以每秒 studs 測量。
屬性
指示該約束目前是否在世界中啟用。
連接到 Constraint.Attachment1 的 Attachment。
連接到 Constraint.Attachment0 的 Attachment。
約束的顏色。
切換約束是否啟用。
切換約束的可見性。