mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 14:01:37 +00:00
232 lines
7.8 KiB
YAML
232 lines
7.8 KiB
YAML
# This file is automatically generated. Please don't edit it manually.
|
|
# To submit a bug report on the content, see
|
|
# https://devforum.roblox.com/c/bug-reports/documentation-issues/72
|
|
|
|
name: BallSocketConstraint
|
|
type: class
|
|
memory_category: BaseParts
|
|
summary: |
|
|
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.
|
|
description: |
|
|
A `BallSocketConstraint` constrains its `Class.Attachment|Attachments` so that
|
|
they occupy the same position. By default it allows both attachments to freely
|
|
rotate about all of their axes, but if
|
|
`Class.BallSocketConstraint.LimitsEnabled|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](../../../physics/units.md) 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 `Class.BallSocketConstraint.LimitsEnabled|LimitsEnabled` property
|
|
exposes the `Class.BallSocketConstraint.UpperAngle|UpperAngle` value to
|
|
restrict **tilt** within a cone; it also exposes the
|
|
`Class.BallSocketConstraint.TwistLimitsEnabled|TwistLimitsEnabled` property
|
|
which, when enabled, lets you restrict **twist** rotation through the
|
|
`Class.BallSocketConstraint.TwistLowerAngle|TwistLowerAngle` and
|
|
`Class.BallSocketConstraint.TwistUpperAngle|TwistUpperAngle` limits.
|
|
code_samples: []
|
|
inherits:
|
|
- Constraint
|
|
descendants: []
|
|
tags: []
|
|
deprecation_message: ''
|
|
properties:
|
|
- name: BallSocketConstraint.LimitsEnabled
|
|
summary: |
|
|
Sets whether the `BallSocketConstraint` sets a limit on rotation based on
|
|
`Class.BallSocketConstraint.UpperAngle|UpperAngle`.
|
|
description: |
|
|
Sets whether the `BallSocketConstraint` has a limit on rotation based on
|
|
`Class.BallSocketConstraint.UpperAngle|UpperAngle`. When `true`, it
|
|
enforces that its `Class.Constraint.Attachment1|Attachment1` isn't rotated
|
|
more than a set angle from its `Class.Constraint.Attachment0|Attachment0`.
|
|
code_samples: []
|
|
type: boolean
|
|
tags: []
|
|
deprecation_message: ''
|
|
security:
|
|
read: None
|
|
write: None
|
|
thread_safety: ReadSafe
|
|
category: BallSocket
|
|
serialization:
|
|
can_load: true
|
|
can_save: true
|
|
capabilities:
|
|
- Physics
|
|
- name: BallSocketConstraint.MaxFrictionTorque
|
|
summary: |
|
|
Sets the maximum frictional torque applied to keep its
|
|
`Class.Attachment|Attachments` aligned.
|
|
description: |
|
|
Sets the maximum frictional torque applied to keep its
|
|
`Class.Attachment|Attachments` aligned.
|
|
|
|
`MaxFrictionTorque` specifies the stiffness of the `BallSocketConstraint`
|
|
(how much it resists rotation around its `Class.Attachment|Attachments`).
|
|
code_samples: []
|
|
type: float
|
|
tags: []
|
|
deprecation_message: ''
|
|
security:
|
|
read: None
|
|
write: None
|
|
thread_safety: ReadSafe
|
|
category: Friction
|
|
serialization:
|
|
can_load: false
|
|
can_save: false
|
|
capabilities:
|
|
- Physics
|
|
- name: BallSocketConstraint.Radius
|
|
summary: |
|
|
The visualized radius of the `BallSocketConstraint`.
|
|
description: |
|
|
The visualized radius of the `BallSocketConstraint`.
|
|
code_samples: []
|
|
type: float
|
|
tags: []
|
|
deprecation_message: ''
|
|
security:
|
|
read: None
|
|
write: None
|
|
thread_safety: ReadSafe
|
|
category: Appearance
|
|
serialization:
|
|
can_load: true
|
|
can_save: true
|
|
capabilities:
|
|
- Physics
|
|
- name: BallSocketConstraint.Restitution
|
|
summary: |
|
|
How elastic `Class.Attachment|Attachments` connected by a
|
|
`BallSocketConstraint` will be when they reach the end of the range
|
|
specified by `Class.BallSocketConstraint.UpperAngle|UpperAngle` when
|
|
`Class.BallSocketConstraint.LimitsEnabled|LimitsEnabled` is `true`.
|
|
description: |
|
|
How elastic `Class.Attachment|Attachments` connected by a
|
|
`BallSocketConstraint` will be when they reach the end of the range
|
|
specified by `Class.BallSocketConstraint.UpperAngle|UpperAngle` when
|
|
`Class.BallSocketConstraint.LimitsEnabled|LimitsEnabled` is `true`.
|
|
Constrained between 0 and 1.
|
|
code_samples: []
|
|
type: float
|
|
tags: []
|
|
deprecation_message: ''
|
|
security:
|
|
read: None
|
|
write: None
|
|
thread_safety: ReadSafe
|
|
category: Limits
|
|
serialization:
|
|
can_load: true
|
|
can_save: true
|
|
capabilities:
|
|
- Physics
|
|
- name: BallSocketConstraint.TwistLimitsEnabled
|
|
summary: |
|
|
Sets whether the `BallSocketConstraint` sets a limit on twist rotation
|
|
based on `Class.BallSocketConstraint.TwistUpperAngle|TwistUpperAngle` and
|
|
`Class.BallSocketConstraint.TwistLowerAngle|TwistLowerAngle`.
|
|
description: |
|
|
Sets whether the `BallSocketConstraint` sets a limit on twist rotation
|
|
based on `Class.BallSocketConstraint.TwistUpperAngle|TwistUpperAngle` and
|
|
`Class.BallSocketConstraint.TwistLowerAngle|TwistLowerAngle`. The twist
|
|
angle is defined as the angle between the **Y** axis of
|
|
`Class.Constraint.Attachment1|Attachment1` and the **Y** axis of
|
|
`Class.Constraint.Attachment0|Attachment0`.
|
|
code_samples: []
|
|
type: boolean
|
|
tags: []
|
|
deprecation_message: ''
|
|
security:
|
|
read: None
|
|
write: None
|
|
thread_safety: ReadSafe
|
|
category: Limits
|
|
serialization:
|
|
can_load: true
|
|
can_save: true
|
|
capabilities:
|
|
- Physics
|
|
- name: BallSocketConstraint.TwistLowerAngle
|
|
summary: |
|
|
Sets the lower twist rotation limit of the `BallSocketConstraint`, as long
|
|
as `Class.BallSocketConstraint.TwistLimitsEnabled|TwistLimitsEnabled` is
|
|
`true`.
|
|
description: |
|
|
Sets the lower twist rotation limit of the `BallSocketConstraint`, as long
|
|
as `Class.BallSocketConstraint.TwistLimitsEnabled|TwistLimitsEnabled` is
|
|
`true`.
|
|
code_samples: []
|
|
type: float
|
|
tags: []
|
|
deprecation_message: ''
|
|
security:
|
|
read: None
|
|
write: None
|
|
thread_safety: ReadSafe
|
|
category: TwistLimits
|
|
serialization:
|
|
can_load: true
|
|
can_save: true
|
|
capabilities:
|
|
- Physics
|
|
- name: BallSocketConstraint.TwistUpperAngle
|
|
summary: |
|
|
Sets the upper twist rotation limit of the `BallSocketConstraint`, as long
|
|
as `Class.BallSocketConstraint.TwistLimitsEnabled|TwistLimitsEnabled` is
|
|
`true`.
|
|
description: |
|
|
Sets the upper twist rotation limit of the `BallSocketConstraint`, as long
|
|
as `Class.BallSocketConstraint.TwistLimitsEnabled|TwistLimitsEnabled` is
|
|
`true`.
|
|
code_samples: []
|
|
type: float
|
|
tags: []
|
|
deprecation_message: ''
|
|
security:
|
|
read: None
|
|
write: None
|
|
thread_safety: ReadSafe
|
|
category: TwistLimits
|
|
serialization:
|
|
can_load: true
|
|
can_save: true
|
|
capabilities:
|
|
- Physics
|
|
- name: BallSocketConstraint.UpperAngle
|
|
summary: |
|
|
Sets the upper rotation limit of the `BallSocketConstraint`, as long as
|
|
`Class.BallSocketConstraint.LimitsEnabled|LimitsEnabled` is `true`.
|
|
description: |
|
|
Sets the upper rotation limit of the `BallSocketConstraint`, as long as
|
|
`Class.BallSocketConstraint.LimitsEnabled|LimitsEnabled` is `true`.
|
|
code_samples: []
|
|
type: float
|
|
tags: []
|
|
deprecation_message: ''
|
|
security:
|
|
read: None
|
|
write: None
|
|
thread_safety: ReadSafe
|
|
category: Limits
|
|
serialization:
|
|
can_load: true
|
|
can_save: true
|
|
capabilities:
|
|
- Physics
|
|
methods: []
|
|
events: []
|
|
callbacks: []
|