Help with CFrame changing ( Orientation )

Usually i don’t post on here but…

I basically want the camera to go to a certain position, and for it to have a certain orientation. I have the position working, however the orientation is where i’ve been stuck for hours. (It is on scriptable)

Whenever i set the orientation, it’s different, and if i change one of the axis (x,y,z), it completely alters the others.

(sorry for the terrible vs code syntax highlighting and theme lol)

This is my Target orientation.

image

This is the code i’m currently using:

The expected result of the orientation should be: ‘-13.08, -134.464, 0’

However, i get this result:

image

Changing any axis from the: ‘-13.08, -134.464, 0’ completely changes the entire direction e.g (-13.09, -134.464, 0 ==> 48.08, -134.464, -15)

I just want the orientation to be: ‘-13.08, -134.464, 0’. If someone could give a step by step process, along with the code, that would be greatly appreciated.

Thanks :slight_smile:

maybe use a part and not just position itself

1 Like

You can just use CFrame.fromOrientation instead of CFrame.Angles. This creates the result you want. Just providing this so you know in the future :slightly_smiling_face:

1 Like

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