Differences between the two? When would .CFrame be better than :GetPivot? Etc
PivotTo
is more of used for Models and such. Usually is used to the set the PrimaryPart
of a Model
but, you might be able to do Model.PrimaryPart.CFrame
Same thing as SetPrimaryPartCFrame
which is deprecated
CFrame
is just Coordinate Frame
, Used to change the Position or Orientation of a Part, but you Cannot use CFrame
to move a Model, PivotTo
can be used with Standard parts tho.
GetPivot()
gets the pivot of like a model which is like Model.PrimaryPart.CFrame usually used for
the method PivotTo
part.CFrame
is the parts individual CFrame
.CFrame is usually used more in a non-model enviroment
Model.PrimaryPart.CFrame is not equal to Model:PivotTo()
In the first case you are setting the primary part’s cframe, in the second, the model instead
Also I never needed CFrame information, just wanted to know if :GetPivot() on a Part returns the same exact CFrame as .CFrame
But :GetPivot supports parts too, which is why im asking what difference would there be between the two in part context
In addition to the above, it can be shown that they are not equal
Both objects are the same, but the blue one has the Pivot lower, if we show the center point with an attachment:
Instance.new("Attachment", workspace.Red).WorldCFrame = workspace.Red.CFrame
Instance.new("Attachment", workspace.Blue).WorldCFrame = workspace.Blue:GetPivot()
GetPivot
shows the chosen center for the PVInstance
, and CFrame
(for Part
) and Model.PrimaryPart.CFrame
(for Model
) shows the actual center.
In the case that both have the same center, they would be identical?
Also, how come blue part’s pivot be low?
It is edited with Model > Edit pivot
Also, the difference is seen in the Properties
.
GetPivot
is Origin
in Properties
.
A model without a pivot offset and no primary part, its cframe would be the center when you run :GetPivot?
Yep, GetPivot
is more reliable than Model.PrimaryPart.CFrame
, since PrimaryPart
may simply be nil
.
Very late response.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.