How to get these cameras orientation properties by script
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))
How to get these cameras orientation properties by script
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)
Orientation is YXZ
, and you used XYZ
.
You could use any of the following:
CFrame:ToOrientation()
CFrame:ToEulerAnglesYXZ()
CFrame:ToEulerAngles(Enum.RotationOrder.YXZ)
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.