SlidingBallConstraint
The base class for constraints that allow their attachments to slide along an axis.
Summary
Properties
Sets whether the translation of the PrismaticConstraint is actuated and, if so, what kind of actuation.
The current offset between the SlidingBallConstraint's Attachment.
Sets whether the SlidingBallConstraint will limit the range of translation.
Specifies the sharpness of the linear servo motor in reaching the SlidingBallConstraint.TargetPosition.
The lower position limit along the x-axis of Constraint.Attachment0 for a SlidingBallConstraint if SlidingBallConstraint.LimitsEnabled is true.
The maximum acceleration a SlidingBallConstraint with SlidingBallConstraint.ActuatorType set to ActuatorType can apply when trying to reach its desired SlidingBallConstraint.Velocity.
The maximum force a SlidingBallConstraint with SlidingBallConstraint.ActuatorType set to ActuatorType can apply when trying to reach its desired SlidingBallConstraint.Velocity.
How elastic Attachment connected by a SlidingBallConstraint will be when they reach the end of the range specified by SlidingBallConstraint.UpperLimit and SlidingBallConstraint.LowerLimit when SlidingBallConstraint.LimitsEnabled is set to true. Constrained between 0 and 1.
The maximum force a SlidingBallConstraint with SlidingBallConstraint.ActuatorType set to ActuatorType can apply when trying to reach its desired SlidingBallConstraint.Speed.
The desired speed a SlidingBallConstraint with SlidingBallConstraint.ActuatorType set to ActuatorType will attempt to maintain while translating towards its SlidingBallConstraint.TargetPosition. Measured in studs/second.
The target position a SlidingBallConstraint will attempt to translate to if its SlidingBallConstraint.ActuatorType is set to ActuatorType. Measured in studs.
The upper position limit along the x-axis of Constraint.Attachment0 for a SlidingBallConstraint if SlidingBallConstraint.LimitsEnabled is true.
The velocity a SlidingBallConstraint with SlidingBallConstraint.ActuatorType set to ActuatorType will attempt to achieve. Measured in studs/second.
Methods
Events
Properties
ActuatorType
Sets whether the translation of the PrismaticConstraint is actuated and, if so, what kind of actuation.
If ActuatorType is set to None, then the joint can slide freely:
If ActuatorType is set to Motor, then the PrismaticConstraint will attempt to move its Attachment at a constant velocity specified by SlidingBallConstraint.Velocity. The PrismaticConstraint will apply a force up to SlidingBallConstraint.MotorMaxForce to achieve the desired velocity but will be limited by SlidingBallConstraint.MotorMaxAcceleration.
If ActuatorType is set to Servo, then the PrismaticConstraint will attempt to move its Attachments to an offset specified by SlidingBallConstraint.TargetPosition. The PrismaticConstraint will attempt to translate towards that goal at a target speed set by SlidingBallConstraint.Speed. The maximum force the PrismaticConstraint is allowed to use to meet these goals is set by SlidingBallConstraint.ServoMaxForce.
CurrentPosition
The current offset between the SlidingBallConstraint's Attachment.
LimitsEnabled
Sets whether the SlidingBallConstraint will limit the range of translation. If enabled, the SlidingBallConstraint.CurrentPosition of the SlidingBallConstraint will only be able to be between the values of SlidingBallConstraint.LowerLimit and SlidingBallConstraint.UpperLimit.
Here is a case where the UpperLimit is 2 and the LowerLimit is -1:
Here is a case where the UpperLimit is 4 and the LowerLimit is 2. Note that in this case the attachments will never be allowed to overlap; they will always be offset:
LinearResponsiveness
This property specifies the sharpness of the linear servo motor in reaching the SlidingBallConstraint.TargetPosition, when the derived classes' actuator type is set to Servo, for example the CylindricalConstraint and PrismaticConstraint. Larger values correspond to faster a response and smaller values results in more damping and a slower response.
LowerLimit
The lower position limit along the x-axis of Constraint.Attachment0 for a SlidingBallConstraint if SlidingBallConstraint.LimitsEnabled is true.
MotorMaxAcceleration
The maximum acceleration a SlidingBallConstraint with SlidingBallConstraint.ActuatorType set to ActuatorType can apply when trying to reach its desired SlidingBallConstraint.Velocity.
MotorMaxForce
The maximum force a SlidingBallConstraint with SlidingBallConstraint.ActuatorType set to ActuatorType can apply when trying to reach its desired SlidingBallConstraint.Velocity.
Restitution
How elastic Attachment connected by a SlidingBallConstraint will be when they reach the end of the range specified by SlidingBallConstraint.UpperLimit and SlidingBallConstraint.LowerLimit when SlidingBallConstraint.LimitsEnabled is set to true. Constrained between 0 and 1.
Restitution of 0
Restitution of 0.5
Restitution of 1
ServoMaxForce
The maximum force a SlidingBallConstraint with SlidingBallConstraint.ActuatorType set to ActuatorType can apply when trying to reach its desired SlidingBallConstraint.Speed.
Size
The visualized size of the SlidingBallConstraint.
Speed
The desired speed a SlidingBallConstraint with SlidingBallConstraint.ActuatorType set to ActuatorType will attempt to maintain while translating towards its SlidingBallConstraint.TargetPosition. Measured in studs/second.
TargetPosition
The target position a SlidingBallConstraint will attempt to translate to if its SlidingBallConstraint.ActuatorType is set to ActuatorType. Measured in studs.
UpperLimit
The upper position limit along the x-axis of Constraint.Attachment0 for a SlidingBallConstraint if SlidingBallConstraint.LimitsEnabled is true.
Velocity
The velocity a SlidingBallConstraint with SlidingBallConstraint.ActuatorType set to ActuatorType will attempt to achieve. Measured in studs/second.