Get Orientation of CFrame

Hello everyone,

I’ve been trying to make a block placer framework for my game. That means I need a preview block in the camera. But, I just want the block to only share the same y-orientation as the Camera CFrame. However, the Camera doesn’t have an Orientation property that I can read from. How can I get the Y orientation of the Camera? Thanks for your help.

If I recall it should be something like:
workspace.CurrentCamera.CFrame:ToEulerAnglesXYZ()
and then you can just work from there.

Oh yeah i forgot about this. Whoops I’ve done this before. Thanks for the solution.

p.s: i can just use :ToOrientation()

1 Like

You can try and do
math.deg(math.asin(workspace.CurrentCamera.CFrame.LookVector.Y))

It doesn’t work, but I messed around a little bit and I found that
-math.asin(CurrentCamera.CFrame.LookVector.X) is the same thing as the y-value of :ToOrientation(). Thanks for your help.