Model

extends PVInstance

Class fields

FieldXML typeValue
NamestringModel
ExplorerOrderstring10
ExplorerImageIndexstring2
summarystringA construct used to group Parts and other objects together, also allows manipulation of multiple objects.

Properties

2
ModelInPrimary
CoordinateFrame
FieldXML typeValue
NamestringModelInPrimary
PrimaryPart
Object
FieldXML typeValue
NamestringPrimaryPart
summarystringA Part that serves as a reference for the Model's CFrame. Used in conjunction with GetModelPrimaryPartCFrame and SetModelPrimaryPartCFrame. Use this to rotate/translate all Parts relative to the PrimaryPart.

Functions

15
BreakJoints
() → void
FieldXML typeValue
NamestringBreakJoints
summarystringBreaks all surface joints contained within
GetExtentsSize
() → Vector3
FieldXML typeValue
NamestringGetExtentsSize
GetModelCFrame
() → CoordinateFrame
FieldXML typeValue
NamestringGetModelCFrame
summarystringReturns a CFrame that has position of the centroid of all Parts in the Model. The rotation matrix is either the rotation matrix of the user-defined PrimaryPart, or if not specified then a part in the Model chosen by the engine.
GetModelSize
() → Vector3
FieldXML typeValue
NamestringGetModelSize
summarystringReturns a Vector3 that is union of the extents of all Parts in the model.
GetPrimaryPartCFrame
() → CoordinateFrame
FieldXML typeValue
NamestringGetPrimaryPartCFrame
summarystringReturns the cframe of the Model.PrimaryPart. If PrimaryPart is nil, then this function will throw an error.
MakeJoints
() → void
FieldXML typeValue
NamestringMakeJoints
summarystringCreates the appropriate SurfaceJoints between all touching Parts contrained within the model. Technically, this function calls MakeJoints() on all Parts inside the model.
MoveTo
(position: Vector3) → void
FieldXML typeValue
NamestringMoveTo
summarystringMoves the centroid of the Model to the specified location, respecting all relative distances between parts in the model.
ResetOrientationToIdentity
() → void
FieldXML typeValue
NamestringResetOrientationToIdentity
summarystringRotates all parts in the model to the orientation that was set using SetIdentityOrientation(). If this function has never been called, rotation is reset to GetModelCFrame()'s rotation.
SetIdentityOrientation
() → void
FieldXML typeValue
NamestringSetIdentityOrientation
summarystringTakes the current rotation matrix of the model and stores it as the model's identity matrix. The rotation is applied when ResetOrientationToIdentity() is called.
SetPrimaryPartCFrame
(cframe: CoordinateFrame) → void
FieldXML typeValue
NamestringSetPrimaryPartCFrame
summarystringSets the cframe of the Model.PrimaryPart. If PrimaryPart is nil, then this function will throw an error. This also sets the cframe of all descendant Parts relative to the cframe change to PrimaryPart.
TranslateBy
(delta: Vector3) → void
FieldXML typeValue
NamestringTranslateBy
summarystringSimilar to MoveTo(), except instead of moving to an explicit location, we use the model's current CFrame location and offset it.
breakJoints
() → void
FieldXML typeValue
NamestringbreakJoints
makeJoints
() → void
FieldXML typeValue
NamestringmakeJoints
summarystringUse MakeJoints() instead
Deprecatedbooltrue
move
(location: Vector3) → void
FieldXML typeValue
Namestringmove
Deprecatedbooltrue
summarystringUse MoveTo() instead
moveTo
(location: Vector3) → void
FieldXML typeValue
NamestringmoveTo