UPDATE: As of June 3rd, the APIs are now permanently enabled on all platforms.
We’re releasing the Pivot Point APIs on the 24th
We currently plan to enable the scripting API for pivot points and make the Pivot Editor available in Team Create on Monday, May 24th. The Studio tooling to view and edit pivot points will still remain in beta for the time being while we modify it in response to developer feedback, however, from May 24th forwards you will be able to start relying on pivot point APIs such as Part/Model:PivotTo(...)
and Part.PivotOffset
in live games and plugins.
While you won’t see Model pivot points in Studio unless you have the beta enabled, every model will have a pivot point from May 24th forwards even if the beta is disabled, and building plugins will have to properly update those pivot points for them to not become out of sync with the models that they belong to.
Most building and object creation plugins will keep pivot points correctly updated, however, the old versions of a few popular plugins will not: F3X Building Tools and Studio Build Suite (SBS) are the most popular ones. These plugins have been recently updated to properly handle pivot points, but you will have to Manage Plugins and hit the update button to get those updates.
Please do this before continuing to use these plugins after the 24th:
Help! I didn’t see this before using them, is my place broken?
No, don’t worry, nothing will be irreparably broken if you continued to use the old version of the plugins!
If you see pivots in weird places for some Models after enabling the Pivot Editor beta because you continued to edit using an old version of SBS or F3X, you can reset the pivots for those Models back to their default values by selecting them and using the “Reset Pivot” button in the Model tab:
However, it will save you some future disruption when the Pivot Editor is fully released if you use the updated version of those plugins, so please update them if you use them in your development workflow.
Reminder: Potentially breaking change to GetBoundingBox()
A quick reminder that as part of releasing the pivot API, the potentially breaking change to Model:GetBoundingBox()
explained in the beta announcement post will take effect. We haven’t heard any reports of this breaking code so far from developers with the Pivot Editor beta enabled, but please keep an eye out for bad behavior in any game where you use Model:GetBoundingBox()
.
Technical details for the curious
What’s going on here, how does the pivot get “out of sync”?
For Models which do not have a PrimaryPart set, the pivot is a position in world space, not directly tied to any of the parts within the model. This is very convenient in allowing you to use pivots on anchored scenery without having to worry about setting a PrimaryPart, but does means that if you move all of the parts underneath the one of those models, the pivot will not automatically move along with them.
This is not an issue for most building and object creation plugins since they used dedicated model movement APIs such as Model:MoveTo
and Model:SetPrimaryPartCFrame
that have been updated to also move the pivot of the model in addition to moving the parts underneath it.
However, some plugins such as F3X and SBS have their own dedicated movement code that individually moves the parts underneath the model, and this code had to be updated to also set the Model.WorldPivot
property of models when moving them.
Going forward, you should use the new PivotTo
API when you want to move models. In addition to updating the pivot like the other model movement APIs, the PivotTo
API has several other benefits (or rather, it will have these benefits after the 24th):
-
It works based off of the pivot, so you can freely set the reference point that makes the most sense for you to move the model relative to, and aren’t required to set a PrimaryPart.
-
It works using the same infrastructure as
BulkMoveTo
, meaning noticeably improved performance compared toSetPrimaryPartCFrame
. -
It does not have floating point drift issues.
PivotTo
caches part offsets internally, so even if you move a model every single frame usingPivotTo
, the parts will always stay perfectly aligned (noticeable gaps will start to form between the parts in the model if you try to do this usingSetPrimaryPartCFrame
).
Thank you and remember to make any necessary updates before May 24th.