Pivot Points - Studio Beta

I can’t either, it’s strange. Perhaps they intentionally disabled the toolbox?

image

EDIT: This is a bug that exists outside of the beta:

4 Likes

Can I just say, wow it took long.

Very pog, definitely useful for quick building. This’ll also be fun to mess around with spinning objects/projectiles/swings :eye:

1 Like

Wait actually?

This is very exciting for games that rely on :SetPrimaryPartCFrame()!


I have a few question.

  1. Is it more reliable than :SetPrimaryPartCFrame()?
  2. Will we be seeing :SetPrimaryPartCFrame() deprecated in the near future for there is something better?
  3. When this is released, which one would be better to use? :SetPrimaryPartCFrame(), or :PivotTo()

Look forward to using this!

2 Likes

Not sure what you mean by “reliable”, but it is more convenient since you can call it on any model and not have to worry about whether it has a PrimaryPart or not.

Yes, as stated in the “Other API Changes”, SetPrimaryPartCFrame will be deprecated after the full release, since PivotTo is a drop-in replacement for it.

PivotTo will be have some performance benefits since it will use the same code as BulkMoveTo does internally (though we haven’t made those changes yet, so it will have the same perf at the moment).

7 Likes

What I mean here was Which one would be better to use, but since :SetPrimaryPartCFrame() will be deprecated, that kind of answers that.

2 Likes

I think the added methods for the API are great but I think the option for developers to modify the pivot through the properties should be added.

And my main reason is pivot points provide a very simple way to modify a part relative to an offset but if I’m understanding the API correctly, if you wanted to apply a 45 degree rotation to the pivot you would have to get the current CFrame of the pivot and then add a CFrame rotation to that pivot. Simple for more experienced developers but I think the ability to write data to all the new properties would be nice for inexperienced developers. As from experience I didn’t understand CFrame quite as quickly as I understood Vector3 manipulation.

Now a valid argument could be made that anyone using pivot points in scripts is doing so because they have used already existing methods which would require you to work with CFrame and methods. My argument against that is these are now easily accessible properties which are visible to be tinkered by new developers. And from about every beginner’s tutorial guide on YouTube many are modifying properties within the first few episodes. But these properties are outliers amongst the other properties making them very odd. By not being marked as read-only but containing spaces these don’t come apparent that you can’t modify these through code, possibly leading to confusion.

In conclusion I think the property names should follow PascalCase like all other properties so inexperienced developers can modify pivot points using Vector3 values over CFrame and decrease confusion as these properties currently don’t follow the consistency of how other properties are setup.

4 Likes

This will definitely make life easier when it comes to pivots based on a point. You could get away with some cool door mechanics rather than manually setting the cframe of the pivot point yourself which is great. Would this be a suitable replacement for arm-based pivots where Motor6Ds are commonly used in regards to inverse kinematics?

1 Like

This will literally make my life so much easier!

1 Like

Excited to see this change! This was definitely one of the things I thought roblox studio was missing and needed to have, and will make workflow much faster as pivoting stuff is done a lot :slight_smile:

1 Like

Comparing this with already existing plugins like archimedes, and ro-peater, does it have the same issue? Where if you use it for too long, the coordinates slightly shift and are out of place, forcing you to have to rebuild the model?

Anyways, I’m glad to see an important feature like this finally integrated into standard studio :smiley:

2 Likes

Such an over due update, I can’t wait!

Darn. I need to start learning C and it’s branches. At least I partially know Java, so that should make it quasi-easier.

1 Like

OH MY GOD!!! You added an Orgin Position Property! Gone are the days of having to create your own functions just to move an entire model! Now we can simply edit this property to move it!!!

EDIT:
Now that my high has worn off I realized what this means…
I have to edit all of my already written code because it has become obsolete. :pensive: But also really
useful!!! :smiley:

EDIT 2:
Your dark sorcery has made ALL my code that uses CFrames to teleport a character obsolete. Now I can just edit the Orgin Position property of the character model and it will move the character without killing it! Now I no-longer have to account for rotation of the player when teleporting them unless I want to set it!!! :partying_face:

EDIT 3:
WHYYYYY!!! I jumped to a conclusion too fast! Your only able to edit the PVInstance | Roblox Creator Documentation and PVInstance | Roblox Creator Documentation properties from the properties window. It has the tag notscriptable :sob:. This has ruined all my hopes and dreams.

5 Likes

You can script using the pivot, just not using that property.

Using the pivot: You use the :PivotTo(target) call to move the object to some location via the pivot, and the :GetPivot() call to ask where the pivot currently is in world space.

Changing the pivot: You set where the pivot is on an object using .PivotOffset for parts and .WorldPivot for models.

6 Likes

This update is what we needed, Blender you can change an objects origin point basically acting as the pivot point. just a few weeks ago I was wishing there was some way to do this, but had to create a part and weld my model to it so it would pivot/move around it, once animated, it was a tree and using the WindShake Editor plugin.

I guess the reason for my comment is, will this make it so we no longer need to do this, and just move the pivot point, or would we need to do these steps mentioned above, if I’m being honest it was a bit of a headache to get it working right.

edit: testing right now

2 Likes

You just move the pivot point where you want it using the Pivot Editor, and then use :PivotTo(target) when you want to move it based on that pivot.

2 Likes

ok, how would I go about doing this, as I only know basic beginner scripting. is there anything else I need to do other then :PivotTo

You need code to figure out what the CFrame you want to move the pivot to is, but that’s it. :PivotTo(target) will move the model and all of its contents such that the pivot is now at the target CFrame.

1 Like

do I need a script inside of the targeted object? sorry for the simple questions I have not really done anything like this before

Edit: ill wait to see what the community puts out for videos on how to set this stuff up

Yeah, at its simplest you could put a script in the object something like this:

local InitialPivot = script.Parent:GetPivot()
while true do
    local change = CFrame.fromEulerAnglesXYZ(math.sin(os.clock()), 0, 0)
    script.Parent:PivotTo(InitialPivot * change)
    wait()
end
4 Likes