I’m setting a custom camera CFrame in the following manner:
local cameraCFrame = CFrame.new() -- initialization to some position here
cameraCFrame = CFrame.new(cameraCFrame.p)
* CFrame.Angles(0, math.rad(rotateLeftRight), 0)
* CFrame.Angles(math.rad(rotateUpDown), 0, 0)
-- where rotateLeftRight and rotateUpDown are some numbers
Once I set a CFrame, how can I get an existing CFrame and retrieve the numbers that would fit in the above equation as rotateLeftRight
and rotateUpDown
? Using CFrame.ToEulerAnglesXYZ
does not seem to give me those numbers.