Hello, I’m trying to get the X,Y,Z orientation of a model however it always gives 0,0,0
(NOTE: This is a model)
But as you can see when I change the orientation:
Hello, I’m trying to get the X,Y,Z orientation of a model however it always gives 0,0,0
(NOTE: This is a model)
But as you can see when I change the orientation:
Duplicate topic of PVInstance:GetPivot().Rotation.Y returning 0 when Origin Orientation is 90 or other number
Why not use Vector for rotation?
How do I use vector for rotation
I believe I have found the solution, you will need to set the primary part of the model.
as @azqjanna suggested.
The model has its own rotation.
If you rotate the part inside the model the model pivot will not update, unless the primary part is that part.
Thank you for providing the example reproduction steps in the picture, I was able to figure out this interesting trait of a models Pivot in relation to the part.
Why not :GetBoundingBox()?
Also it is returning 0,0,0 because it does not have a primary part.
Without primary part
With primary part:
(Both were Y)
First screenshot (without primary part) has rotation in y-90
same goes for second screenshot with -0, 1.570…,0
The only difference in the last command is i changed the rotation to 180.
Unless if you DON’T wanna use primary part, :GetBoundingBox() will always be aligned and return the world axes.
Okay so I got it working cause apparently I was referencing the wrong part when doing :ToOrientation() so it was always 0,0,0
bassically though it still doesnt work cause when I get the orientation from :ToOrientation() it gives
["X"] = 0,
["Y"] = 3.141592741012573,
["Z"] = 0
but when I put that X,Y,Z into CFrame.Angles() like such:
PlotInfo:PivotTo(CFrame.new(Vector3.new(X,15.1,Z)) * CFrame.Angles(math.rad(v.Rotation.X), math.rad(v.Rotation.Y), math.rad(v.Rotation.Z)))
it gives some weird stuff:
when its supposed to look like
How do I convert :ToOrienation to CFrame.Angles()
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.