mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 14:01:37 +00:00
378 lines
13 KiB
YAML
378 lines
13 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: AlignOrientation
|
|
type: class
|
|
memory_category: BaseParts
|
|
summary: |
|
|
Constraint which applies torque to align two attachments, or to align one
|
|
attachment with a goal orientation.
|
|
description: |
|
|
The `AlignOrientation` constraint applies torque to align two attachments, or
|
|
to align one attachment with a goal orientation. As indicated by the name, it
|
|
only affects the **orientation** of the attachments, not their position (to
|
|
align attachments **positionally**, see `Class.AlignPosition`).
|
|
|
|
Torque created by `AlignOrientation` is applied about the center of mass of
|
|
the parent of the attachments, or the center of mass of parts rigidly
|
|
connected to the parents.
|
|
|
|
When configuring this constraint, it may be helpful to study
|
|
[Roblox Units](../../../physics/units.md) to understand how Roblox units
|
|
compare to metric units.
|
|
|
|
#### Affected Axes
|
|
|
|
The axes affected by torque are controlled through the constraint's
|
|
`Class.AlignOrientation.AlignType|AlignType` property. When set to
|
|
`Enum.AlignType|PrimaryAxisParallel`,
|
|
`Enum.AlignType|PrimaryAxisPerpendicular` or
|
|
`Enum.AlignType|PrimaryAxisLookAt`, torque will only occur when the primary
|
|
axes become misaligned. Otherwise, the constraint will apply torque about all
|
|
3 axes to achieve alignment.
|
|
|
|
#### Reactionary Torque
|
|
|
|
By default, the constraint only applies torque to
|
|
`Class.Constraint.Attachment0|Attachment0` while
|
|
`Class.Constraint.Attachment1|Attachment1` remains unaffected. If desired,
|
|
torque can be applied to both attachments in **equal and opposite directions**
|
|
by enabling
|
|
`Class.AlignOrientation.ReactionTorqueEnabled|ReactionTorqueEnabled`.
|
|
|
|
#### Torque Magnitude
|
|
|
|
You can configure this constraint to apply the maximum torque that constraints
|
|
allow through the `Class.AlignOrientation.RigidityEnabled|RigidityEnabled`
|
|
property. When `true`, the physics solver reacts as quickly as possible to
|
|
complete the alignment. When `false`, the torque is determined by
|
|
`Class.AlignOrientation.MaxTorque|MaxTorque`,
|
|
`Class.AlignOrientation.MaxAngularVelocity|MaxAngularVelocity`, and
|
|
`Class.AlignOrientation.Responsiveness|Responsiveness`.
|
|
|
|
#### Attachment Mode
|
|
|
|
This constraint can use either **one** or **two** attachments in calculating
|
|
its goal. See `Class.AlignOrientation.Mode|Mode` for details.
|
|
code_samples: []
|
|
inherits:
|
|
- Constraint
|
|
descendants: []
|
|
tags: []
|
|
deprecation_message: ''
|
|
properties:
|
|
- name: AlignOrientation.AlignType
|
|
summary: |
|
|
The constraint's axis alignment type.
|
|
description: |
|
|
Specifies the desired relationship between the primary axes of
|
|
`Class.Constraint.Attachment0|Attachment0` and the goal. Available options
|
|
are `Enum.AlignType|AllAxes`, `Enum.AlignType|PrimaryAxisParallel`,
|
|
`Enum.AlignType|PrimaryAxisPerpendicular`, and
|
|
`Enum.AlignType|PrimaryAxisLookAt`. The constraint will attempt to
|
|
maintain the specified relationship, as given by the `Enum.AlignType`, by
|
|
applying torques onto the relevant axes.
|
|
code_samples: []
|
|
type: AlignType
|
|
tags: []
|
|
deprecation_message: ''
|
|
security:
|
|
read: None
|
|
write: None
|
|
thread_safety: ReadSafe
|
|
category: AlignOrientation
|
|
serialization:
|
|
can_load: true
|
|
can_save: true
|
|
capabilities:
|
|
- Physics
|
|
- name: AlignOrientation.CFrame
|
|
summary: |
|
|
The `Datatype.CFrame` orientation with which the constraint will attempt
|
|
to match the orientation of `Class.Constraint.Attachment0|Attachment0`.
|
|
description: |
|
|
The `Datatype.CFrame` orientation (translation component ignored) with
|
|
which the constraint will attempt to match the orientation of
|
|
`Class.Constraint.Attachment0|Attachment0`. Only used when
|
|
`Class.AlignOrientation.Mode|Mode` is set to
|
|
`Enum.OrientationAlignmentMode|OneAttachment`.
|
|
code_samples: []
|
|
type: CFrame
|
|
tags: []
|
|
deprecation_message: ''
|
|
security:
|
|
read: None
|
|
write: None
|
|
thread_safety: ReadSafe
|
|
category: TargetOrientation
|
|
serialization:
|
|
can_load: true
|
|
can_save: true
|
|
capabilities:
|
|
- Physics
|
|
- name: AlignOrientation.LookAtPosition
|
|
summary: |
|
|
A `Datatype.Vector3` world space location toward which the primary axis
|
|
will attempt to align.
|
|
description: |
|
|
A `Datatype.Vector3` world space location toward which the primary axis
|
|
will attempt to align. This is only active when
|
|
`Class.AlignOrientation.AlignType|AlignType` is set to
|
|
`Enum.AlignType|PrimaryAxisLookAt` and `Class.AlignOrientation.Mode|Mode`
|
|
is set to `Enum.OrientationAlignmentMode|OneAttachment`.
|
|
code_samples: []
|
|
type: Vector3
|
|
tags:
|
|
- NotReplicated
|
|
deprecation_message: ''
|
|
security:
|
|
read: None
|
|
write: None
|
|
thread_safety: ReadSafe
|
|
category: TargetOrientation
|
|
serialization:
|
|
can_load: false
|
|
can_save: false
|
|
capabilities:
|
|
- Physics
|
|
- name: AlignOrientation.MaxAngularVelocity
|
|
summary: |
|
|
Maximum angular velocity the constraint can use to reach its goal.
|
|
description: |
|
|
Maximum angular velocity the constraint can use to reach its goal. Only
|
|
used if `Class.AlignOrientation.RigidityEnabled|RigidityEnabled` is
|
|
`false`.
|
|
|
|
Note that `Class.AlignOrientation.MaxAngularVelocity|MaxAngularVelocity`,
|
|
as well as `Class.AlignOrientation.MaxTorque|MaxTorque`, are **caps** to
|
|
the angular velocity and torque respectively. The actual scale is
|
|
determined by `Class.AlignOrientation.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: AlignOrientation.MaxTorque
|
|
summary: |
|
|
Maximum torque the constraint can use to reach its goal.
|
|
description: |
|
|
Maximum torque the constraint can use to reach its goal. Only used if
|
|
`Class.AlignOrientation.RigidityEnabled|RigidityEnabled` is `false`.
|
|
|
|
Note that `Class.AlignOrientation.MaxTorque|MaxTorque`, as well as
|
|
`Class.AlignOrientation.MaxAngularVelocity|MaxAngularVelocity`, are
|
|
**caps** to the torque and angular velocity respectively. The actual scale
|
|
is determined by `Class.AlignOrientation.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: AlignOrientation.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.OrientationAlignmentMode|TwoAttachment`, meaning that the constraint
|
|
attempts to match the orientation of
|
|
`Class.Constraint.Attachment0|Attachment0` with the orientation of
|
|
`Class.Constraint.Attachment1|Attachment1`, disregarding
|
|
`Class.AlignOrientation.CFrame|CFrame`,
|
|
`Class.AlignOrientation.PrimaryAxis|PrimaryAxis`, and
|
|
`Class.AlignOrientation.SecondaryAxis|SecondaryAxis`.
|
|
|
|
If set to `Enum.OrientationAlignmentMode|OneAttachment`, the constraint
|
|
disregards `Class.Constraint.Attachment1|Attachment1` and attempts to
|
|
match the orientation of `Class.Constraint.Attachment0|Attachment0` with
|
|
the orientation of `Class.AlignOrientation.CFrame|CFrame`, or match the
|
|
attachment's `Class.Attachment.Axis|Axis` and
|
|
`Class.Attachment.SecondaryAxis|SecondaryAxis` with the constraint's
|
|
`Class.AlignOrientation.PrimaryAxis|PrimaryAxis` and
|
|
`Class.AlignOrientation.SecondaryAxis|SecondaryAxis` properties
|
|
respectively.
|
|
code_samples: []
|
|
type: OrientationAlignmentMode
|
|
tags: []
|
|
deprecation_message: ''
|
|
security:
|
|
read: None
|
|
write: None
|
|
thread_safety: ReadSafe
|
|
category: AlignmentMode
|
|
serialization:
|
|
can_load: true
|
|
can_save: true
|
|
capabilities:
|
|
- Physics
|
|
- name: AlignOrientation.PrimaryAxis
|
|
summary: |
|
|
The direction of the goal's **X** axis, represented as a unit
|
|
`Datatype.Vector3`.
|
|
description: |
|
|
The direction of the goal's **X** axis, represented as a unit
|
|
`Datatype.Vector3`. Only used when `Class.AlignOrientation.Mode|Mode` is
|
|
`Enum.OrientationAlignmentMode|OneAttachment`.
|
|
code_samples: []
|
|
type: Vector3
|
|
tags:
|
|
- NotReplicated
|
|
deprecation_message: ''
|
|
security:
|
|
read: None
|
|
write: None
|
|
thread_safety: ReadSafe
|
|
category: TargetOrientation
|
|
serialization:
|
|
can_load: false
|
|
can_save: false
|
|
capabilities:
|
|
- Physics
|
|
- name: AlignOrientation.PrimaryAxisOnly
|
|
summary: |
|
|
Determines how the constraint's axes are affected by torque.
|
|
description: |
|
|
Determines how the constraint's axes are affected by torque. If `false`
|
|
(default), the constraint will apply torque about all 3 axes to
|
|
achieve alignment. If `true`, torque will only occur when the primary axes
|
|
become misaligned.
|
|
|
|
Enabling `Class.AlignOrientation.PrimaryAxisOnly|PrimaryAxisOnly` also
|
|
enables the `Class.AlignOrientation.AlignType|AlignType` property.
|
|
code_samples: []
|
|
type: boolean
|
|
tags: []
|
|
deprecation_message: |
|
|
This property is deprecated. Depending on your usage case, set
|
|
`Class.AlignOrientation.AlignType|AlignType` directly to
|
|
`Enum.AlignType|PrimaryAxisParallel`,
|
|
`Enum.AlignType|PrimaryAxisPerpendicular` or
|
|
`Enum.AlignType|PrimaryAxisLookAt` instead.
|
|
security:
|
|
read: None
|
|
write: None
|
|
thread_safety: ReadSafe
|
|
category: AlignOrientation
|
|
serialization:
|
|
can_load: true
|
|
can_save: true
|
|
capabilities:
|
|
- Physics
|
|
- name: AlignOrientation.ReactionTorqueEnabled
|
|
summary: |
|
|
Whether the constraint applies torque only to
|
|
`Class.Constraint.Attachment0|Attachment0`, or to both attachments in
|
|
equal and opposite directions.
|
|
description: |
|
|
If `false` (default), the constraint only applies torque to
|
|
`Class.Constraint.Attachment0|Attachment0` while
|
|
`Class.Constraint.Attachment1|Attachment1` remains unaffected. If `true`,
|
|
the constraint applies torque to both attachments in **equal and opposite
|
|
directions**.
|
|
code_samples: []
|
|
type: boolean
|
|
tags: []
|
|
deprecation_message: ''
|
|
security:
|
|
read: None
|
|
write: None
|
|
thread_safety: ReadSafe
|
|
category: AlignOrientation
|
|
serialization:
|
|
can_load: true
|
|
can_save: true
|
|
capabilities:
|
|
- Physics
|
|
- name: AlignOrientation.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: AlignOrientation.RigidityEnabled
|
|
summary: |
|
|
Whether torque is dependent on other properties, or if the physics solver
|
|
reacts as quickly as possible to complete the alignment.
|
|
description: |
|
|
Whether torque is dependent on other properties, or if the physics solver
|
|
reacts as quickly as possible to complete the alignment. If `false`
|
|
(default), the torque is determined by
|
|
`Class.AlignOrientation.MaxTorque|MaxTorque`,
|
|
`Class.AlignOrientation.MaxAngularVelocity|MaxAngularVelocity`, and
|
|
`Class.AlignOrientation.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: AlignOrientation
|
|
serialization:
|
|
can_load: true
|
|
can_save: true
|
|
capabilities:
|
|
- Physics
|
|
- name: AlignOrientation.SecondaryAxis
|
|
summary: |
|
|
The direction of the goal's **Y** axis, represented as a unit
|
|
`Datatype.Vector3`.
|
|
description: |
|
|
The direction of the goal's **Y** axis, represented as a unit
|
|
`Datatype.Vector3`. Only used when `Class.AlignOrientation.Mode|Mode` is
|
|
`Enum.OrientationAlignmentMode|OneAttachment`.
|
|
code_samples: []
|
|
type: Vector3
|
|
tags:
|
|
- NotReplicated
|
|
deprecation_message: ''
|
|
security:
|
|
read: None
|
|
write: None
|
|
thread_safety: ReadSafe
|
|
category: TargetOrientation
|
|
serialization:
|
|
can_load: false
|
|
can_save: false
|
|
capabilities:
|
|
- Physics
|
|
methods: []
|
|
events: []
|
|
callbacks: []
|