This commit is contained in:
Joe 2026-02-02 12:08:47 -06:00
parent a9b4f8e83b
commit e6efc04756
8494 changed files with 495610 additions and 0 deletions

View file

@ -0,0 +1,350 @@
# 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: AlignPosition
type: class
memory_category: BaseParts
summary: |
Constraint which applies force to move two attachments together, or to move
one attachment to a goal position.
description: |
The `AlignPosition` constraint applies force to move two attachments together,
or to move one attachment to a goal position. As indicated by the name, it
only affects the **position** of the attachments, not their orientation (to
align attachments by **orientation**, see `Class.AlignOrientation`).
When configuring this constraint, it may be helpful to study
[Roblox Units](../../../physics/units.md) to understand how Roblox units
compare to metric units.
#### Force Location
By default, force is applied to the parent of
`Class.Constraint.Attachment0|Attachment0` at that attachment's location,
meaning that if the parent's center of mass is not aligned with the direction
of the force, torque will be applied as well as force. Alternatively, force
can be applied to the parents' center of mass by toggling on
`Class.AlignPosition.ApplyAtCenterOfMass|ApplyAtCenterOfMass`.
#### Reactionary Force
By default, the constraint only applies force to
`Class.Constraint.Attachment0|Attachment0` while
`Class.Constraint.Attachment1|Attachment1` remains unaffected. If desired,
force can be applied to both attachments in **equal and opposite directions**
by enabling `Class.AlignPosition.ReactionForceEnabled|ReactionForceEnabled`.
#### Force Limits
You can configure this constraint to apply the maximum force that constraints
allow through the `Class.AlignPosition.RigidityEnabled|RigidityEnabled`
property. When `true`, the physics solver reacts as quickly as possible to
complete the alignment. When `false`, the force applied by the constraint is
limited based on `Class.AlignPosition.ForceLimitMode|ForceLimitMode`,
`Class.AlignPosition.MaxVelocity|MaxVelocity`, and
`Class.AlignPosition.Responsiveness|Responsiveness`. See
`Class.AlignPosition.ForceLimitMode|ForceLimitMode` for further details.
#### Attachment Mode
This constraint can use either **one** or **two** attachments in calculating
its goal. See `Class.AlignPosition.Mode|Mode` for details.
code_samples: []
inherits:
- Constraint
descendants: []
tags: []
deprecation_message: ''
properties:
- name: AlignPosition.ApplyAtCenterOfMass
summary: |
Whether force is applied to the parent of
`Class.Constraint.Attachment0|Attachment0` at that attachment's location,
or at the parents' center of mass.
description: |
When `false` (default), force is applied to the parent of
`Class.Constraint.Attachment0|Attachment0` at that attachment's location,
meaning that if the parent's center of mass is not aligned with the
direction of the force, torque will be applied as well as force. When
`true`, force is applied at the parents' center of mass.
code_samples: []
type: boolean
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: AlignPosition
serialization:
can_load: true
can_save: true
capabilities:
- Physics
- name: AlignPosition.ForceLimitMode
summary: |
Determines how the constraint force will be limited. Only used if
`Class.AlignPosition.RigidityEnabled|RigidityEnabled` is `false`.
description: |
Determines how the constraint force will be limited when
`Class.AlignPosition.RigidityEnabled|RigidityEnabled` is `false`. When set
to `Enum.ForceLimitMode|Magnitude`, the constraint force will be limited
such that the magnitude is less than
`Class.AlignPosition.MaxForce|MaxForce`. When set to
`Enum.ForceLimitMode|PerAxis`, the constraint force along each axis will
be limited by `Class.AlignPosition.MaxAxesForce|MaxAxesForce`. The axes
along which the force will be limited are based on the
`Class.AlignPosition.ForceRelativeTo|ForceRelativeTo` property.
code_samples: []
type: ForceLimitMode
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Compliance
serialization:
can_load: true
can_save: true
capabilities:
- Physics
- name: AlignPosition.ForceRelativeTo
summary: |
Determines the axes that the constraint uses to limit the force. Only
applies when `Class.AlignPosition.RigidityEnabled|RigidityEnabled` is
`false` and `Class.AlignPosition.ForceLimitMode` is
`Enum.ForceLimitMode|PerAxis`. .
description: |
Determines the axes that the constraint uses to limit the force. Only
applies when `Class.AlignPosition.RigidityEnabled|RigidityEnabled` is
`false` and `Class.AlignPosition.ForceLimitMode` is
`Enum.ForceLimitMode|PerAxis`. When set to
`Enum.ActuatorRelativeTo|World`, the constraint force is computed in the
world reference frame and the force limits specified in
`Class.AlignPosition.MaxAxesForce|MaxAxesForce` refer to the axes of the
world coordinate system. When set to `Enum.ActuatorRelativeTo|Attachment0`
or `Enum.ActuatorRelativeTo|Attachment1`, the force limits specified in
`Class.AlignPosition.MaxAxesForce|MaxAxesForce` refer to the axes of the
specified attachment coordinate system.
code_samples: []
type: ActuatorRelativeTo
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Compliance
serialization:
can_load: true
can_save: true
capabilities:
- Physics
- name: AlignPosition.MaxAxesForce
summary: |
Maximum force along each axis that the constraint can apply to achieve its
goal.
description: |
Maximum force along each axis that the constraint can apply to achieve its
goal. Only used if `Class.AlignPosition.RigidityEnabled|RigidityEnabled`
is `false` and `Class.AlignPosition.ForceLimitMode|ForceLimitMode` is
`Enum.ForceLimitMode|PerAxis`. The axes used to apply to the limit are
specified using the `Class.AlignPosition.ForceRelativeTo|ForceRelativeTo`
property.
code_samples: []
type: Vector3
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Compliance
serialization:
can_load: true
can_save: true
capabilities:
- Physics
- name: AlignPosition.MaxForce
summary: |
Maximum force magnitude the constraint can apply to achieve its goal.
description: |
Maximum force magnitude the constraint can apply to achieve its goal. Only
used if `Class.AlignPosition.RigidityEnabled|RigidityEnabled` is `false`
and `Class.AlignPosition.ForceLimitMode|ForceLimitMode` is
`Enum.ForceLimitMode|Magnitude`.
Note that `Class.AlignPosition.MaxForce|MaxForce`, as well as
`Class.AlignPosition.MaxVelocity|MaxVelocity`, are **caps** to the force
and velocity respectively. The actual scale is determined by
`Class.AlignPosition.Responsiveness|Responsiveness`.
code_samples: []
type: float
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Compliance
serialization:
can_load: true
can_save: true
capabilities:
- Physics
- name: AlignPosition.MaxVelocity
summary: |
Maximum speed the attachments can move when converging.
description: |
Maximum speed the attachments can move when converging. Only used if
`Class.AlignPosition.RigidityEnabled|RigidityEnabled` is `false`.
Note that `Class.AlignPosition.MaxVelocity|MaxVelocity`, as well as
`Class.AlignPosition.MaxForce|MaxForce`, are **caps** to the velocity and
force respectively. The actual scale is determined by
`Class.AlignPosition.Responsiveness|Responsiveness`.
code_samples: []
type: float
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Compliance
serialization:
can_load: true
can_save: true
capabilities:
- Physics
- name: AlignPosition.Mode
summary: |
Whether the constraint uses one or two attachments in calculating its
goal.
description: |
Whether the constraint uses **one** or **two** attachments in calculating
its goal. By default, this is `Enum.PositionAlignmentMode|TwoAttachment`,
meaning that the constraint disregards
`Class.AlignPosition.Position|Position` and attempts to move
`Class.Constraint.Attachment0|Attachment0` to the position of
`Class.Constraint.Attachment1|Attachment1`.
If set to `Enum.PositionAlignmentMode|OneAttachment`, the constraint
disregards `Class.Constraint.Attachment1|Attachment1` and attempts to move
`Class.Constraint.Attachment0|Attachment0` to
`Class.AlignPosition.Position|Position`.
code_samples: []
type: PositionAlignmentMode
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: AlignmentMode
serialization:
can_load: true
can_save: true
capabilities:
- Physics
- name: AlignPosition.Position
summary: |
The position to which the constraint should move its
`Class.Constraint.Attachment0|Attachment0`.
description: |
The position to which the constraint should move its
`Class.Constraint.Attachment0|Attachment0`. Only used if
`Class.AlignPosition.Mode|Mode` is set to
`Enum.PositionAlignmentMode|OneAttachment`, in which case
`Class.Constraint.Attachment1|Attachment1` is disregarded.
code_samples: []
type: Vector3
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: AlignPosition
serialization:
can_load: true
can_save: true
capabilities:
- Physics
- name: AlignPosition.ReactionForceEnabled
summary: |
Whether the constraint applies force only to
`Class.Constraint.Attachment0|Attachment0`, or to both attachments in
equal and opposite directions.
description: |
If `false` (default), the constraint only applies force to
`Class.Constraint.Attachment0|Attachment0` while
`Class.Constraint.Attachment1|Attachment1` remains unaffected. If `true`,
the constraint applies force to both attachments in **equal and opposite
directions**.
code_samples: []
type: boolean
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: AlignPosition
serialization:
can_load: true
can_save: true
capabilities:
- Physics
- name: AlignPosition.Responsiveness
summary: |
Controls how quickly the constraint reaches its goal. Higher values cause
the attachment(s) to align more rapidly.
description: |
Controls how quickly the constraint reaches its goal. Higher values cause
the attachment(s) to align more rapidly. Value can be between 5 and 200.
code_samples: []
type: float
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Compliance
serialization:
can_load: true
can_save: true
capabilities:
- Physics
- name: AlignPosition.RigidityEnabled
summary: |
Whether force is dependent on other properties, or if the physics solver
reacts as quickly as possible to complete the alignment.
description: |
Whether force is dependent on other properties, or if the physics solver
reacts as quickly as possible to complete the alignment. If `false`
(default), the force is determined by
`Class.AlignPosition.MaxForce|MaxForce`,
`Class.AlignPosition.MaxVelocity|MaxVelocity`, and
`Class.AlignPosition.Responsiveness|Responsiveness`. If `true`, the
physics solver reacts as quickly as possible to complete the alignment.
code_samples: []
type: boolean
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: AlignPosition
serialization:
can_load: true
can_save: true
capabilities:
- Physics
methods: []
events: []
callbacks: []