Class
BallSocketConstraint
Forces its two attachments into the same position and allows them to freely rotate about all three axes, with optional limits to restrict both tilt and twist.
A BallSocketConstraint constrains its Attachments so that
they occupy the same position. By default it allows both attachments to freely
rotate about all of their axes, but if
LimitsEnabled is true, the
attachments can only rotate in a limited cone.
Note that if this constraint attaches one part (A) to another part (B) that is anchored or connected to an anchored part (Z), part A will not be locally simulated when interacting with a player.
When configuring this constraint, it may be helpful to study Roblox Units to understand how Roblox units compare to metric units.
Limits#
You can set limits to restrict both tilt and twist of a ball socket,
similar to how a human's head can tilt and turn within a limited axial range.
Enabling the LimitsEnabled property
exposes the UpperAngle value to
restrict tilt within a cone; it also exposes the
TwistLimitsEnabled property
which, when enabled, lets you restrict twist rotation through the
TwistLowerAngle and
TwistUpperAngle limits.
Properties 8#
LimitsEnabledboolean | Sets whether the BallSocketConstraint sets a limit on rotation based on
UpperAngle.ReadSafe |
MaxFrictionTorquefloat | Sets the maximum frictional torque applied to keep its
Attachments aligned.ReadSafe |
Radiusfloat | The visualized radius of the BallSocketConstraint.ReadSafe |
Restitutionfloat | How elastic Attachments connected by a
BallSocketConstraint will be when they reach the end of the range
specified by UpperAngle when
LimitsEnabled is true.ReadSafe |
TwistLimitsEnabledboolean | Sets whether the BallSocketConstraint sets a limit on twist rotation
based on TwistUpperAngle and
TwistLowerAngle.ReadSafe |
TwistLowerAnglefloat | Sets the lower twist rotation limit of the BallSocketConstraint, as long
as TwistLimitsEnabled is
true.ReadSafe |
TwistUpperAnglefloat | Sets the upper twist rotation limit of the BallSocketConstraint, as long
as TwistLimitsEnabled is
true.ReadSafe |
UpperAnglefloat | Sets the upper rotation limit of the BallSocketConstraint, as long as
LimitsEnabled is true.ReadSafe |
LimitsEnabled: boolean#
ReadSafe
Sets whether the BallSocketConstraint has a limit on rotation based on
UpperAngle. When true, it
enforces that its Attachment1 isn't rotated
more than a set angle from its Attachment0.
MaxFrictionTorque: float#
ReadSafe
Sets the maximum frictional torque applied to keep its
Attachments aligned.
MaxFrictionTorque specifies the stiffness of the BallSocketConstraint
(how much it resists rotation around its Attachments).
Radius: float#
ReadSafe
The visualized radius of the BallSocketConstraint.
Restitution: float#
ReadSafe
How elastic Attachments connected by a
BallSocketConstraint will be when they reach the end of the range
specified by UpperAngle when
LimitsEnabled is true.
Constrained between 0 and 1.
TwistLimitsEnabled: boolean#
ReadSafe
Sets whether the BallSocketConstraint sets a limit on twist rotation
based on TwistUpperAngle and
TwistLowerAngle. The twist
angle is defined as the angle between the Y axis of
Attachment1 and the Y axis of
Attachment0.
TwistLowerAngle: float#
ReadSafe
Sets the lower twist rotation limit of the BallSocketConstraint, as long
as TwistLimitsEnabled is
true.
TwistUpperAngle: float#
ReadSafe
Sets the upper twist rotation limit of the BallSocketConstraint, as long
as TwistLimitsEnabled is
true.
UpperAngle: float#
ReadSafe
Sets the upper rotation limit of the BallSocketConstraint, as long as
LimitsEnabled is true.
Inherited members#
Inherited from Instance 58
Properties (10)
Archivable, archivable, Capabilities, IsInSandbox, Name, Parent, PredictionMode, RobloxLocked, Sandboxed, UniqueId
Methods (39)
AddTag, children, ClearAllChildren, Clone, clone, Destroy, destroy, FindFirstAncestor, FindFirstAncestorOfClass, FindFirstAncestorWhichIsA, FindFirstChild, findFirstChild, FindFirstChildOfClass, FindFirstChildWhichIsA, FindFirstDescendant, GetActor, GetAttribute, GetAttributeChangedSignal, GetAttributes, GetChildren, getChildren, GetDebugId, GetDescendants, GetFullName, GetStyled, GetStyledPropertyChangedSignal, GetTags, HasTag, IsAncestorOf, IsDescendantOf, isDescendantOf, IsPropertyModified, QueryDescendants, Remove, remove, RemoveTag, ResetPropertyToDefault, SetAttribute, WaitForChild