Change CFrame orientation

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I would like the camera orientation to be:-65.691, 179.632, 0. And keep the changing of the position tho.

  2. What is the issue? Include screenshots / videos if possible!
    I can’t find a way to do it.
    Script:

repeat wait() until workspace.CurrentCamera

local camera = workspace.CurrentCamera

camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = CFrame.new(-63.357, 29.432, -17.559) --Change position
  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I can’t find a solution

Use a rotation CFrame which contains rotation only and add a new position vector to maintain the old position.

local orientationCFrame = CFrame.fromOrientation(math.rad(-65.691), math.rad(179.632), 0)
camera.CFrame = orientationCFrame  + camera.CFrame.Position
2 Likes

Thank you for giving the solution

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