SliderJoint3D
繼承: Joint3D < Node3D < Node < Object
一種物理關節,能夠將 3D 物理體的移動限制在相對於另一個物理體的某個軸上。
說明
一種物理關節,能夠將 3D 物理體的移動限制在相對於另一個物理體的某個軸上。例如物體 A 是代表活塞基底的 StaticBody3D,而物體 B 是代表活塞頭的 RigidBody3D,能夠上下移動。
屬性
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
方法
void |
列舉
enum Param: 🔗
Param PARAM_LINEAR_LIMIT_UPPER = 0
Constant for accessing linear_limit/upper_distance. The maximum difference between the pivot points on their X axis before damping happens.
Param PARAM_LINEAR_LIMIT_LOWER = 1
Constant for accessing linear_limit/lower_distance. The minimum difference between the pivot points on their X axis before damping happens.
Param PARAM_LINEAR_LIMIT_SOFTNESS = 2
Constant for accessing linear_limit/softness. A factor applied to the movement across the slider axis once the limits get surpassed. The lower, the slower the movement.
Param PARAM_LINEAR_LIMIT_RESTITUTION = 3
Constant for accessing linear_limit/restitution. The amount of restitution once the limits are surpassed. The lower, the more velocity-energy gets lost.
Param PARAM_LINEAR_LIMIT_DAMPING = 4
Constant for accessing linear_limit/damping. The amount of damping once the slider limits are surpassed.
Param PARAM_LINEAR_MOTION_SOFTNESS = 5
Constant for accessing linear_motion/softness. A factor applied to the movement across the slider axis as long as the slider is in the limits. The lower, the slower the movement.
Param PARAM_LINEAR_MOTION_RESTITUTION = 6
Constant for accessing linear_motion/restitution. The amount of restitution inside the slider limits.
Param PARAM_LINEAR_MOTION_DAMPING = 7
Constant for accessing linear_motion/damping. The amount of damping inside the slider limits.
Param PARAM_LINEAR_ORTHOGONAL_SOFTNESS = 8
Constant for accessing linear_ortho/softness. A factor applied to the movement across axes orthogonal to the slider.
Param PARAM_LINEAR_ORTHOGONAL_RESTITUTION = 9
Constant for accessing linear_motion/restitution. The amount of restitution when movement is across axes orthogonal to the slider.
Param PARAM_LINEAR_ORTHOGONAL_DAMPING = 10
Constant for accessing linear_motion/damping. The amount of damping when movement is across axes orthogonal to the slider.
Param PARAM_ANGULAR_LIMIT_UPPER = 11
Constant for accessing angular_limit/upper_angle. The upper limit of rotation in the slider.
Param PARAM_ANGULAR_LIMIT_LOWER = 12
Constant for accessing angular_limit/lower_angle. The lower limit of rotation in the slider.
Param PARAM_ANGULAR_LIMIT_SOFTNESS = 13
Constant for accessing angular_limit/softness. A factor applied to the all rotation once the limit is surpassed.
Param PARAM_ANGULAR_LIMIT_RESTITUTION = 14
Constant for accessing angular_limit/restitution. The amount of restitution of the rotation when the limit is surpassed.
Param PARAM_ANGULAR_LIMIT_DAMPING = 15
Constant for accessing angular_limit/damping. The amount of damping of the rotation when the limit is surpassed.
Param PARAM_ANGULAR_MOTION_SOFTNESS = 16
Constant for accessing angular_motion/softness. A factor applied to the all rotation in the limits.
Param PARAM_ANGULAR_MOTION_RESTITUTION = 17
Constant for accessing angular_motion/restitution. The amount of restitution of the rotation in the limits.
Param PARAM_ANGULAR_MOTION_DAMPING = 18
Constant for accessing angular_motion/damping. The amount of damping of the rotation in the limits.
Param PARAM_ANGULAR_ORTHOGONAL_SOFTNESS = 19
Constant for accessing angular_ortho/softness. A factor applied to the all rotation across axes orthogonal to the slider.
Param PARAM_ANGULAR_ORTHOGONAL_RESTITUTION = 20
Constant for accessing angular_ortho/restitution. The amount of restitution of the rotation across axes orthogonal to the slider.
Param PARAM_ANGULAR_ORTHOGONAL_DAMPING = 21
Constant for accessing angular_ortho/damping. The amount of damping of the rotation across axes orthogonal to the slider.
Param PARAM_MAX = 22
代表 Param 列舉的大小。
屬性說明
float angular_limit/damping = 0.0 🔗
超過限制時旋轉的阻尼量。
較低的阻尼值允許由主體 A 發起的旋轉以較慢的速度傳播到主體 B。
float angular_limit/lower_angle = 0.0 🔗
滑桿旋轉的下限。
float angular_limit/restitution = 0.7 🔗
當超過極限時,旋轉的恢復量。
不影響阻尼。
float angular_limit/softness = 1.0 🔗
套用於所有旋轉超過限制後的係數。
在 0 和 1 之間時使所有旋轉變慢。
float angular_limit/upper_angle = 0.0 🔗
滑桿旋轉的上限。
float angular_motion/damping = 1.0 🔗
極限內旋轉的阻尼量。
float angular_motion/restitution = 0.7 🔗
極限內旋轉的恢復量。
float angular_motion/softness = 1.0 🔗
套用於所有受限旋轉的係數。
float angular_ortho/damping = 1.0 🔗
垂直於滑桿的軸上的旋轉阻尼量。
float angular_ortho/restitution = 0.7 🔗
垂直於滑桿的軸上的旋轉恢復量。
float angular_ortho/softness = 1.0 🔗
套用於與滑動條正交的軸的所有旋轉的係數。
float linear_limit/damping = 1.0 🔗
一旦超過 linear_limit/lower_distance 和 linear_limit/upper_distance 所定義的極限,就會產生的阻尼量。
float linear_limit/lower_distance = -1.0 🔗
阻尼發生前軸心點之間在 X 軸上的最小差異。
float linear_limit/restitution = 0.7 🔗
超出限制後的補償。數值越低,損失的速度能量越多。
float linear_limit/softness = 1.0 🔗
一旦超過極限,套用於滑桿軸上移動的係數。越低,運動越慢。
float linear_limit/upper_distance = 1.0 🔗
阻尼發生前軸心點之間在 X 軸上的最大差異。
float linear_motion/damping = 0.0 🔗
滑桿內部的阻尼量受到限制。
float linear_motion/restitution = 0.7 🔗
滑桿限制內的恢復量。
float linear_motion/softness = 1.0 🔗
只要滑桿在限制範圍內,就套用於滑桿軸上移動的係數。越低,運動越慢。
float linear_ortho/damping = 1.0 🔗
當移動穿過垂直於滑桿的軸時的阻尼量。
float linear_ortho/restitution = 0.7 🔗
當移動穿過垂直於滑桿的軸時的恢復量。
float linear_ortho/softness = 1.0 🔗
套用於在垂直於滑桿的軸上移動的係數。
方法說明
float get_param(param: Param) const 🔗
Returns the value of the given parameter.
void set_param(param: Param, value: float) 🔗
Assigns value to the given parameter.