Rotation question

Silly question, but is there a difference between model.CFrame.Rotation, and model.Rotation? If so, what is the difference?

1 Like

Are you talking about a Model instance? those don’t have a CFrame or Rotation property, unless you go the PrimaryPart,in which case i don’t think there is any difference because Roation is part of the CFrame

Sorry, I was referring to the PrimaryPart but that makes sense. Do you also know if there is a difference between :PivotTo and just setting a model’s CFrame?

I think you don’t need to have a primary part for :PivotTo() because Models have pivots but no CFrame

Ah, so PivotTo is for “setting the CFrame” of an object without a CFrame?

The concept of the Pivot was introduced so that you can add a reference point to a Part or Model, which is treated like a local origin, by both Studio’s build tools and by SetPivot().

For a Part, the Pivot (in world space) is Part.CFrame * Part.PivotOffset, where PivotOffset is an object-space CFrame that you set to move the pivot point.

For a Model with a PrimaryPart, the Model pivot is just the pivot of the PrimaryPart. Setting the Model’s PivotOffset is really just setting the PivotOffset of its PrimaryPart.

For a Model with no PrimaryPart set, the Model has a default pivot that is just the center of the Model’s computed Origin (its bounding box center). But you can edit Model.WorldPivot by giving it a world-space CFrame, and the Model will retain that new pivot, internally storing it as an offset from wherever the Origin is when you set it.

Using studio’s Rotate tool will rotate a Part or Model about its pivot.

Part:PivotTo(cf) and Model:PivotTo(cf) will move the Part or Model so that its pivot aligns with the passed-in world-space CFrame. It’s basically an oriented registration point that’s there to make manipulation more natural and require less code.

Thanks, this helps a lot! -------------

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.