# AlignOrientation

Roblox Engine API class from Roblox Studio 0.744.0.7441077 (version-7aaa6838d36c4448).

- Inherits from, nearest first: [Constraint](https://rapi.sleaze.dev/classes/Constraint.md), [Instance](https://rapi.sleaze.dev/classes/Instance.md), [Object](https://rapi.sleaze.dev/classes/Object.md)
- Memory category: BaseParts
- HTML page: https://rapi.sleaze.dev/classes/AlignOrientation/
- Roblox documentation: https://create.roblox.com/docs/reference/engine/classes/AlignOrientation

Constraint which applies torque to align two attachments, or to align one attachment with a goal orientation.

## Properties

### Mode

```luau
AlignOrientation.Mode: Enum.OrientationAlignmentMode = Enum.OrientationAlignmentMode.TwoAttachment
```

- Tags: Read capabilities: Physics, Simulation access

Whether the constraint uses one or two attachments in calculating its goal.

### AlignType

```luau
AlignOrientation.AlignType: Enum.AlignType = Enum.AlignType.AllAxes
```

- Tags: Read capabilities: Physics, Simulation access

The constraint's axis alignment type.

### PrimaryAxisOnly

```luau
AlignOrientation.PrimaryAxisOnly: boolean = false
```

- Tags: Read capabilities: Physics, Simulation access

Determines how the constraint's axes are affected by torque.

### ReactionTorqueEnabled

```luau
AlignOrientation.ReactionTorqueEnabled: boolean = false
```

- Tags: Read capabilities: Physics, Simulation access

Whether the constraint applies torque only to [`Attachment0`](https://rapi.sleaze.dev/classes/Constraint.md), or to both attachments in equal and opposite directions.

### RigidityEnabled

```luau
AlignOrientation.RigidityEnabled: boolean = false
```

- Tags: Read capabilities: Physics, Simulation access

Whether torque is dependent on other properties, or if the physics solver reacts as quickly as possible to complete the alignment.

### MaxAngularVelocity

```luau
AlignOrientation.MaxAngularVelocity: number = INF
```

- Tags: Read capabilities: Physics, Simulation access

Maximum angular velocity the constraint can use to reach its goal.

### MaxTorque

```luau
AlignOrientation.MaxTorque: number = 10000
```

- Tags: Read capabilities: Physics, Simulation access

Maximum torque the constraint can use to reach its goal.

### Responsiveness

```luau
AlignOrientation.Responsiveness: number = 10
```

- Tags: Read capabilities: Physics, Simulation access

Controls how quickly the constraint reaches its goal. Higher values cause the attachment(s) to align more rapidly.

### CFrame

```luau
AlignOrientation.CFrame: CFrame = CFrame.identity
```

- Tags: Read capabilities: Physics, Simulation access

The [`CFrame`](https://rapi.sleaze.dev/index/types/CFrame.md) orientation with which the constraint will attempt to match the orientation of [`Attachment0`](https://rapi.sleaze.dev/classes/Constraint.md).

### LookAtPosition

```luau
AlignOrientation.LookAtPosition: Vector3 = Vector3.zero
```

- Tags: Not replicated, Read capabilities: Physics, Simulation access

A [`Vector3`](https://rapi.sleaze.dev/index/types/Vector3.md) world space location toward which the primary axis will attempt to align.

### PrimaryAxis

```luau
AlignOrientation.PrimaryAxis: Vector3 = Vector3.new(1, 0, 0)
```

- Tags: Not replicated, Read capabilities: Physics, Simulation access

The direction of the goal's **X** axis, represented as a unit [`Vector3`](https://rapi.sleaze.dev/index/types/Vector3.md).

### SecondaryAxis

```luau
AlignOrientation.SecondaryAxis: Vector3 = Vector3.new(0, 1, 0)
```

- Tags: Not replicated, Read capabilities: Physics, Simulation access

The direction of the goal's **Y** axis, represented as a unit [`Vector3`](https://rapi.sleaze.dev/index/types/Vector3.md).

## Inherited members

- From [Constraint](https://rapi.sleaze.dev/classes/Constraint.md): `Color`, `Visible`, `Attachment0`, `Attachment1`, `Active`, `Enabled`, `GetDebugAppliedForce`, `GetDebugAppliedTorque`
- From [Instance](https://rapi.sleaze.dev/classes/Instance.md): `Archivable`, `archivable`, `Attributes`, `AttributesReplicate`, `AttributesSerialize`, `HistoryId`, `Name`, `Parent`, `PredictionMode`, `PropertyStatusStudio`, `RobloxLocked`, `SerializedOverrides`, `SourceAssetId`, `Tags`, `UniqueId`, `numExpectedDirectChildren`, `DataCost`, `Capabilities`, `DefinesCapabilities`, `IsInSandbox`, `Sandboxed`, `AddTag`, `ClearAllChildren`, `Clone`, `Destroy`, `FindFirstAncestor`, `FindFirstAncestorOfClass`, `FindFirstAncestorWhichIsA`, `FindFirstChild`, `FindFirstChildOfClass`, `FindFirstChildWhichIsA`, `FindFirstDescendant`, `GetActor`, `GetAttribute`, `GetAttributeChangedSignal`, `GetAttributes`, `GetChildren`, `GetDebugId`, `GetDescendants`, `GetFullName`, `GetStyled`, `GetStyledPropertyChangedSignal`, `GetTags`, `HasTag`, `IsAncestorOf`, `IsDescendantOf`, `IsPropertyModified`, `QueryDescendants`, `RemoveTag`, `ResetPropertyToDefault`, `SetAttribute`, `WaitForChild`, `Remove`, `children`, `clone`, `destroy`, `findFirstChild`, `getChildren`, `isDescendantOf`, `remove`, `AncestryChanged`, `AttributeChanged`, `ChildAdded`, `ChildRemoved`, `DescendantAdded`, `DescendantRemoving`, `Destroying`, `StyledPropertiesChanged`, `childAdded`
- From [Object](https://rapi.sleaze.dev/classes/Object.md): `ClassName`, `className`, `GetPropertyChangedSignal`, `IsA`, `isA`, `Changed`
