CylindricalConstraint

A CylindricalConstraint allows its attachments to slide along one axis and rotate about another axis. This constraint, along with a SpringConstraint, is ideal for building vehicle suspensions where the wheel shock can slide up and down while the wheel itself spins. This constraint can also be powered in both an angular and linear manner.

Angular Power

If a cylindrical's AngularActuatorType is set to Motor, it attempts to rotate the attachments with the goal of reaching its AngularVelocity. You can further control this rotation through both MotorMaxAngularAcceleration and MotorMaxTorque.

If a cylindrical's AngularActuatorType is set to Servo, it attempts to rotate to an angle specified by TargetAngle. This rotation is controlled by AngularSpeed, AngularResponsiveness, and ServoMaxTorque.

Linear Power

If a cylindrical's ActuatorType is set to Motor, it attempts to translate the attachments with the goal of reaching Velocity. You can further control this translation through both MotorMaxAcceleration and MotorMaxForce.

If a cylindrical's ActuatorType is set to Servo, it attempts to translate the attachments to a set separation specified by TargetPosition. This translation is controlled by Speed, LinearResponsiveness, and ServoMaxForce.

Limits

You can set limits to restrict both the sliding range and rotation of a cylindrical constraint.

Enabling the LimitsEnabled property exposes the LowerLimit and UpperLimit values, as well as Restitution which defines the elasticity of the attachments when they reach either limit.

Enabling the AngularLimitsEnabled property exposes the LowerAngle and UpperAngle limits, as well as AngularRestitution which defines the elasticity of the attachments when they reach either limit.

LimitsEnabled = true
AngularLimitsEnabled = true

Inclination Angle

InclinationAngle defines the direction of the rotation axis as an angle from the X axis in the X/Y plane of Attachment0, from -180 to 180. This lets you tilt the rotating element without changing the sliding axis.

InclinationAngle = 90
InclinationAngle = 30