Hello guys, I’m having trouble with Enum.RotationOrder, im trying to change the parameters order of the CFrame.fromEulerAngles function but it doesn’t work
here is my code:
MyPart.CFrame *= CFrame.fromEulerAngles(0, math.rad(45), 0, Enum.RotationOrder.YXZ)
or the Enum.RotationOrder.XYZ could be different as Enum.RotationOrder.ZYX
https://create.roblox.com/docs/reference/engine/enums/RotationOrder
as in this topic get said, you can change the rotation order, as i understood it process as if you use Enum.RotationOrder.ZYX then you’re able to control the Z from first parameter. it must be like that. i don’t know if i misunderstood that or not.
but if it’s like how i specified then it’s not working. when i change the Enum.RotationOrder as Enum.RotationOrder.ZYX and set first parameter which is X axis, it sets X axis as X axis in 3D workspace not Z axis it’s not replacing Z axis to X axis parameter of the function.
as i search for some reason in the math, it must be working as if you turn X axis Y axis must be turned and if you turn Y axis X axis must be turned. i had this problem to remember which one axis was turning which axis actually. so i was trying to use RotationOrder to not get used to Y X Z cordinated system, if i need to use it i had to remember which one axis was turning which one as i say, but then i found this function of CFrame, .fromEulerAnglesYXZ which already says which one turns which one so i don’t need this RotationOrder anymore but. that must have worked too. Because it’s already made for that problem i think. I don’t know why that didn’t work but as i say don’t need that anymore.