HingeConstraint
Creates a hinge joint that allows rotation around one axis, like a door or wheel.
Properties
| Property | Type | Default |
|---|---|---|
Attachment0 | any | nil |
Attachment1 | any | nil |
Enabled | boolean | true |
Visible | boolean | true |
Color | any | Color3.fromRGB(255, 255, 0) |
ActuatorType | EnumItem | Enum.ActuatorType.None |
AngularVelocity | number | 2 |
MotorMaxAcceleration | number | 100 |
MotorMaxTorque | number | 10000 |
ServoMaxTorque | number | 10000 |
TargetAngle | number | 0 |
LimitsEnabled | boolean | false |
LowerAngle | number | -45 |
UpperAngle | number | 45 |
Restitution | number | 0 |
Offset | CFrame | CFrame.new(0, 0, 0) |
Functions
`cleanup`
`rebuild`
`onPartChanged`
On part changed.
`instance:UpdateActuator`
Updates actuator.
`instance:UpdateLimits`
Updates limits.
`drawGizmo`
Draws the visual representation.
`toRaylibColor`
To raylib color.
cleanup
Arguments
This function takes no arguments.
Returns
This function returns nothing.
rebuild
Arguments
This function takes no arguments.
Returns
This function returns nothing.
onPartChanged
On part changed.
Arguments
property: numberReturns
This function returns nothing.
instance:UpdateActuator
Updates actuator.
Arguments
This function takes no arguments.
Returns
This function returns nothing.
instance:UpdateLimits
Updates limits.
Arguments
This function takes no arguments.
Returns
This function returns nothing.
drawGizmo
Draws the visual representation.
Arguments
This function takes no arguments.
Returns
This function returns nothing.
toRaylibColor
To raylib color.
Arguments
c: any, a: numberReturns
This function returns nothing.
API
instance:cleanup()
instance:rebuild()
instance:onPartChanged(property: number)
instance:UpdateActuator()
instance:UpdateLimits()
instance:drawGizmo()
instance:toRaylibColor(c: any, a: number)