PVInstance
Abstract class for all objects that have a physical location in the world.
| Memory category | Instances |
|---|
Member index 4
Removed member index 5
| History | Member | |
|---|---|---|
| 337 | CoordinateFrame: CoordinateFrame | |
| 557 | Origin Orientation: Vector3 | |
| 557 | Origin Position: Vector3 | |
| 557 | Pivot Offset Orientation: Vector3 | |
| 557 | Pivot Offset Position: Vector3 |
Description
A PVInstance is an abstract class that cannot be created. It is the base for all objects that have a physical location in the world.
History 31
- 731 Change Default of Pivot Offset from to
- 731 Change Default of Origin from to
- 726 Change Default of Pivot Offset from to
- 726 Change Default of Origin from to
- 576 Change ThreadSafety of GetPivot from Unsafe to Safe
- 573 Change ReturnType of PivotTo from void to null
- 557 Remove Pivot Offset Position
- 557 Remove Pivot Offset Orientation
- 557 Remove Origin Position
- 557 Remove Origin Orientation
- 553 Change Default of Pivot Offset Position from to
- 553 Change Default of Pivot Offset Orientation from to
- 553 Change Default of Pivot Offset from to
- 553 Change Default of Origin Position from to
- 553 Change Default of Origin Orientation from to
- 553 Change Default of Origin from to
- 550 Add Pivot Offset
- 550 Add Origin
- 486 Change ThreadSafety of Pivot Offset Position from ReadOnly to ReadSafe
- 486 Change ThreadSafety of Pivot Offset Orientation from ReadOnly to ReadSafe
- 486 Change ThreadSafety of Origin Position from ReadOnly to ReadSafe
- 486 Change ThreadSafety of Origin Orientation from ReadOnly to ReadSafe
- 470 Add PivotTo
- 470 Add GetPivot
- 470 Add Pivot Offset Position
- 470 Add Pivot Offset Orientation
- 470 Add Origin Position
- 470 Add Origin Orientation
- 337 Remove CoordinateFrame
- 47 Add CoordinateFrame
- 47 Add PVInstance
Members 4
GetPivot
| Parameters (0) | ||
|---|---|---|
| No parameters. | ||
| Returns (1) | ||
| CFrame | ||
This function gets the pivot of a PVInstance. This is often used with PVInstance:PivotTo() to move a model.
Models and BaseParts are both PVInstances ("Position Velocity Instances") and so both have this function.
| Thread safety | Safe |
|---|
Origin
| Type | Default | |
|---|---|---|
| CFrame | ||
Editor-only property, shown in the Studio Properties window as Origin Position and Origin Orientation under Transform. Its value is the world-space CFrame of the instance's pivot; reading it returns the same CFrame as PVInstance:GetPivot(). It has no stored value of its own and always reflects the current pivot.
Setting it from the Properties window moves the whole instance so its
pivot lands at the new CFrame, much like
PVInstance:PivotTo(). Editing through the Properties window
temporarily disables WeldConstraints to other
objects for the move; PivotTo does not modify joints.
Not available to scripts; use PVInstance:GetPivot() and PVInstance:PivotTo() at runtime instead.
| Thread safety | ReadSafe |
|---|---|
| Category | Transform |
| Loaded/Saved | false |
Pivot Offset
| Type | Default | |
|---|---|---|
| CFrame | ||
Editor-only property, shown in the Studio Properties window as Pivot Position and Pivot Orientation under Pivot. It is the CFrame of the pivot relative to the instance's own frame.
Changing it from the Properties window moves the pivot relative to the
instance while leaving the instance in place, unlike Origin, which moves
the whole instance. For a BasePart, the offset defaults to the
identity CFrame, so the pivot coincides with the part's center.
For a Model, this property appears only when the model has a
PrimaryPart; it then reflects and edits that
part's PivotOffset, and
Model:GetPivot() aliases the primary part's pivot.
Not available to scripts; scripts read and write the equivalent through the concrete class, such as BasePart.PivotOffset.
| Thread safety | ReadSafe |
|---|---|
| Category | Pivot |
| Loaded/Saved | false |
History 4
- 731 Change Default of Pivot Offset from to
- 726 Change Default of Pivot Offset from to
- 553 Change Default of Pivot Offset from to
- 550 Add Pivot Offset
PivotTo
| Parameters (1) | ||
|---|---|---|
| targetCFrame | CFrame | |
| Returns (1) | ||
| null | ||
Transforms the PVInstance along with all of its descendant PVInstances such that the pivot is now located at the specified CFrame. This is the primary function that should be used to move Models via scripting.
BaseParts are moved in this way by having their CFrame transformed by the necessary offset. Models are moved in this way by having their Model.WorldPivot transformed by the necessary offset.
Note that for efficiency purposes, Object.Changed events are not fired for Position and Orientation of BaseParts moved in this way; they are only fired for CFrame.
When calling PivotTo on Models, the offsets of the descendant parts and models are cached, such that subsequent calls to PivotTo on the same model do not accumulate floating point drift between the parts making up the model.
Models and BaseParts are both PVInstances ("Position Velocity Instances") and so both have this function.
| Thread safety | Unsafe |
|---|
Removed members 5
CoordinateFrame
| Type | Default | |
|---|---|---|
| CoordinateFrame | ||
| Category | |
|---|---|
| Loaded/Saved | false |
History 2
- 337 Remove CoordinateFrame
- 47 Add CoordinateFrame
Origin Orientation
| Type | Default | |
|---|---|---|
| Vector3 | ||
| Thread safety | ReadSafe |
|---|---|
| Category | Transform |
| Loaded/Saved | false |
History 4
- 557 Remove Origin Orientation
- 553 Change Default of Origin Orientation from to
- 486 Change ThreadSafety of Origin Orientation from ReadOnly to ReadSafe
- 470 Add Origin Orientation
Origin Position
| Type | Default | |
|---|---|---|
| Vector3 | ||
| Thread safety | ReadSafe |
|---|---|
| Category | Transform |
| Loaded/Saved | false |
History 4
- 557 Remove Origin Position
- 553 Change Default of Origin Position from to
- 486 Change ThreadSafety of Origin Position from ReadOnly to ReadSafe
- 470 Add Origin Position
Pivot Offset Orientation
| Type | Default | |
|---|---|---|
| Vector3 | ||
| Thread safety | ReadSafe |
|---|---|
| Category | Pivot |
| Loaded/Saved | false |
History 4
- 557 Remove Pivot Offset Orientation
- 553 Change Default of Pivot Offset Orientation from to
- 486 Change ThreadSafety of Pivot Offset Orientation from ReadOnly to ReadSafe
- 470 Add Pivot Offset Orientation
Pivot Offset Position
| Type | Default | |
|---|---|---|
| Vector3 | ||
| Thread safety | ReadSafe |
|---|---|
| Category | Pivot |
| Loaded/Saved | false |
History 4
- 557 Remove Pivot Offset Position
- 553 Change Default of Pivot Offset Position from to
- 486 Change ThreadSafety of Pivot Offset Position from ReadOnly to ReadSafe
- 470 Add Pivot Offset Position