Skip to content

Latest commit

 

History

History
156 lines (130 loc) · 7.44 KB

pivot-tools.md

File metadata and controls

156 lines (130 loc) · 7.44 KB
title description
Pivot Tools
Pivot tools and properties give you full control over the points around which objects rotate and translate.

The Pivot tools and related properties give you full control over the points around which objects rotate and translate.

Studio Tools

The interactive Studio tools are located in the Model tab.

Studio's Model tab with the Pivot Tools section highlighted.

Edit Pivot

The Edit Pivot tool lets you move or rotate the pivot point of a part or model. Once set, rotation and scaling occur around the pivot point. For more information, see Setting a PrimaryPart.

The following diagrams show example pivot locations in relation to object bounds.

A blue cube with its pivot point set in the center of the cube. A green circle represents the object's rotation in relation to its pivot point.

A blue cube with its pivot point set on a corner of the cube. A green circle represents the object's rotation in relation to its pivot point.

A blue cube with its pivot point set on outside of the cube's geometry. A green circle represents the object's rotation in relation to its pivot point.

When you rotate the pivot of a model, the bounding box of the model also rotates.

A model of a purple, blue, and red block with its pivot point set on a the edge of the model's bounding box. A green circle represents the object's rotation in relation to its pivot point.

You can specify a Class.Model.PrimaryPart|PrimaryPart for models, which is a Class.BasePart within the model that you can use as a positional basis. In terms of pivot points:

  1. When you assign a `Class.Model.PrimaryPart|PrimaryPart` to a model, the existing pivot changes to the pivot point of the `Class.Model.PrimaryPart|PrimaryPart`. If you later unassign/clear the `Class.Model.PrimaryPart|PrimaryPart`, the pivot point resets to the **center** of the model's bounding box.
  2. If you **delete** the `Class.Model.PrimaryPart|PrimaryPart` from a model, the pivot point remains in the same location and does **not** revert to its previous position. This prevents a sudden "jump" if you delete any parts from the model.

Snap

The Snap checkbox toggles whether the pivot point snaps to hotspots such as corners, edges, or centers when you move it with the Edit Pivot tool. When snapping is enabled, hotspots display as small magenta points.

Hotspots on a part

Hotspots on a model

Reset

The Reset button moves the pivot point to the center of an object or model's bounding box. This operation is useful after you've changed the composition of a model and wish to place its pivot point at the center of its new bounding box.

Pivot Properties

In addition to the interactive tools, pivot values can be directly set in the Properties window.

Property Description
**Origin Position** Current world location of the object based on its pivot point rather than its bounding box. Useful for setting the precise location of a `Class.Model`.
**Origin Orientation** Current orientation of the object based around its pivot point rather than its bounding box.
**Pivot Offset Position** Precise location of the pivot relative to the object.¹
**Pivot Offset Orientation** Precise pivot orientation.¹
**World Pivot Position** The precise world location of the pivot for `Class.Model|Models` without a `Class.Model.PrimaryPart|PrimaryPart`. If a `Class.Model.PrimaryPart|PrimaryPart` is set, the model will use **Pivot Offset Position** since the pivot becomes relative to that part.¹
**World Pivot Orientation** The precise world orientation for `Class.Model|Models` without a `Class.Model.PrimaryPart|PrimaryPart`. If a `Class.Model.PrimaryPart|PrimaryPart` is set, the model will use **Pivot Offset Orientation** since the pivot becomes relative to that part.¹
1 Changing this property will not move or rotate the object.

Scripting Pivots

Beyond the Studio tools, pivot points can be accessed and manipulated in scripts.

Function or Property Description
`Class.PVInstance:GetPivot()|GetPivot()` Queries the current world location of an object's pivot as a `Datatype.CFrame`. This returns an object's position in 3D space regardless of whether it's an individual part or a `Class.Model`.
`Class.PVInstance:PivotTo()|PivotTo()` Moves the object such that its pivot will be located at the specified `Datatype.CFrame`. This allows for uniform object movement of both individual parts and models.
`Class.BasePart.PivotOffset` The `Datatype.CFrame` which specifies the pivot offset; effectively the offset of the pivot from the `Datatype.CFrame` of the `Class.BasePart`.²
`Class.BasePart.PivotOffset|Model.WorldPivot` For `Class.Model|Models` without a `Class.Model.PrimaryPart|PrimaryPart`, the `Datatype.CFrame` which specifies the model's pivot in world space. If a `Class.Model.PrimaryPart|PrimaryPart` is set, the model will use `Class.BasePart.PivotOffset` since the pivot becomes relative to that part.²
2 Changing this property will not move or rotate the object.