Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


PhysicsSliderJointDefinition

A joint definition used to specify properties when creating a PhysicsSliderJoint.
Read time 2 minutesLast updated 11 days ago

Definition

public struct PhysicsSliderJointDefinition

Constructors

Constructor

Description

PhysicsSliderJointDefinition()Create a default PhysicsSliderJoint definition.
PhysicsSliderJointDefinition(System.Boolean)Create a default PhysicsSliderJoint] definition.

Properties

Property

Description

bodyAThe first body the joint constrains.
bodyBThe second body the joint constrains.
collideConnectedWhether the shapes on the pair of bodies can come into contact.
drawScaleControls the scaling of the joint drawing. Not all joints have scalable elements but those that do will use this scaling.
enableLimitEnable/disable the joint translation limit.
enableMotorEnable/disable the joint motor.
enableSpringEnable/Disable a spring along the slider joint axis.
forceThresholdThe force threshold beyond which a joint event will be produced.
localAnchorAThe local anchor frame constraint relative to bodyA's origin.
localAnchorBThe local anchor frame constraint relative to bodyB's origin.
lowerTranslationLimitThe lower translation limit of this joint. This will be clamped to a lower stable limit.
maxMotorForceThe maximum force the motor can apply, usually in newtons.
motorSpeedThe desired motor speed, usually in meters per second.
springDampingThe spring damping, non-dimensional. Use 1 for critical damping.
springFrequencyThe spring stiffness frequency, in cycles per second.
springTargetTranslationThe spring target translation, usually in meters. The spring-damper will drive to this translation.
torqueThresholdThe torque threshold beyond which a joint event will be produced.
tuningDampingControls the joint stiffness damping, non-dimensional. Use 1 for critical damping.
tuningFrequencyControls the joint stiffness frequency, in cycles per second.
upperTranslationLimitThe upper translation limit of this joint. Must be greater than or equal to the minimum length.

Static Properties

Property

Description

defaultDefinitionGet a default PhysicsSliderJoint definition.