Camera CFrame ToEulerAnglesXYZ returning unrelated numbers

Hello! Recently i’ve been trying to get the X orientation of a camera, but when looking in certain directions, it returns messed numbers, what is wrong here? I haven’t found anything useful in the DevForum, and haven’t found a solution for this.

	local x = workspace.CurrentCamera.CFrame:ToEulerAnglesXYZ()
	x = math.deg(x)
	print(x)

This is the number that should be in the output:

image

This is what the output shows:

image

:ToEulerAnglesXYZ() will Return the Rotation in a ZYX Format, you can probably use :ToOrientation() or :ToEulerAnglesYXZ() to get a Different Format.

2 Likes

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