How to get these cameras orientation properties by script

How to get these cameras orientation properties by script

Π‘Π½ΠΈΠΌΠΎΠΊ экрана 2022-11-12 155325

this script does not give the same result

local x, y, z = CurrentCamera.CFrame:ToEulerAnglesXYZ()
print(math.deg(x), math.deg(y), math.deg(z))

You could try

local x, y, z = camera.CFrame:ToOrientation()
x = math.deg(x), y = math.deg(y), z = math.deg(z)
1 Like

Orientation is YXZ, and you used XYZ.
You could use any of the following:
CFrame:ToOrientation()
CFrame:ToEulerAnglesYXZ()
CFrame:ToEulerAngles(Enum.RotationOrder.YXZ)

1 Like

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