Very simple question, I just need to know how I can rotate the cframe (of the camera) without changing the camera’s position. Using cframe.angles() like on the Cframes documentation (CFrames | Documentation - Roblox Creator Hub) just resets the cframe position then rotates it. Please help!
What code have you tried already?
Just the CFrame.angles() technique. I’m not really sure what else to try as searching it up on google reveals no results…
local part = YourPart
part.CFrame = CFrame.new(part.Position, PositionToLookAt)
I just need to set the x,y,z components of the cframe, I don’t need it looking at another part
local part = YourPart
part.CFrame = CFrame.new(part.Position, Vector3.new(x, y, z))
I don’t need the cframe to LOOK at a position, I need it to change THIS property:
Of the CFrame.
Is this classified info or something lol
local camera = workspace.CurrentCamera
camera.CFrame = camera.CFrame * CFrame.Angles()
In a way it would change the Orientation. But yeah, what @JohhnyLegoKing said is right too. Do not forget to use math.rad() with CFrame.Angles() like this:
CFrame.Angles(math.rad(x), math.rad(x), math.rad(x))
Excepted if you want to use the radiant angles
I eventually found out you need to multiply the position of the CFrame by the orientation you want. (also I didn’t mean to reply to Boustifail in the post above, so I deleted it) Sorry everyone!
Hey!
I don’t know if you fixed your issue, but here is the solution:
workspace.CurrentCamera.CFrame = CFrame.fromOrientation(0,0,0)
As I said, I had already solved the problem but your solution is very similar to what I did. Thanks for the help :)
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.