Skip to content

Physics.SliderConstraint

Name - Description Default Type
<input> Any
<output> Any
FirstBody The first body, keep unset to attach to the fixed world none Var(Physics.Body)
SecondBody The second body, keep unset to attach to the fixed world none Var(Physics.Body)
Static Static node, persist when not activated false Bool
Enabled Can be used to toggle this node when it has static persistence true BoolVar(Bool)
Space This determines in which space the constraint is setup, all other properties should be in the specified space ConstraintSpace::LocalToBodyCOM ConstraintSpace
FirstPoint The position of the connection point for the first body. @f3(0 0 0) Float3Var(Float3)
SecondPoint The position of the connection point for the second body. @f3(0 0 0) Float3Var(Float3)
SliderAxis Axis along which movement is possible. @f3(1 0 0) Float3Var(Float3)
NormalAxis Vector perpendicular to the slider axis, to define the frame @f3(0 1 0) Float3Var(Float3)
LimitsMin The maximum distance the slider can move in the negative direction. 1.17549e-38 FloatVar(Float)
LimitsMax The maximum distance the slider can move in the positive direction. 3.40282e+38 FloatVar(Float)
LimitSpring When set, makes the limits soft. {damping: 1 frequency: 0} {frequency: Float damping: Float}{stiffness: Float damping: Float}Var({frequency: Float damping: Float})Var({stiffness: Float damping: Float})
MaxFrictionForce Maximum amount of friction force to apply (in Newtons) on the slider. 0 FloatVar(Float)
MotorSettings Defines the maximum and minimum amount of force of the motor applied to the slider. {maxForceLimit: 3.40282e+38 maxTorqueLimit: 3.40282e+38 minForceLimit: 1.17549e-38 minTorqueLimit: 1.17549e-38} {minForceLimit: Float maxForceLimit: Float minTorqueLimit: Float maxTorqueLimit: Float}Var({minForceLimit: Float maxForceLimit: Float minTorqueLimit: Float maxTorqueLimit: Float})
MotorSpringSettings Defines the Motor spring settings applied on the slider {damping: 1 frequency: 0} {frequency: Float damping: Float}{stiffness: Float damping: Float}Var({frequency: Float damping: Float})Var({stiffness: Float damping: Float})

This shard creates a slider constraint between two bodies, turning the two bodies into sliders that can slide along the axis specified in the SliderAxis parameter.