You can write your topic however you want, but you need to answer these questions:
I. I want to rotate a camera through a script around the world Y axis, so the Z rotation is not affected.
-
My camera turn around it’s local Y axis so it’s rolling, i’m quite new to CFrame and object/world space so i don’t really know how to achieve that.
-
I search alot and i tried to understand Object/World space, and operation with CFrame, but the part i still rotating around it’s own Y axis.
This is my code :
local function TurnLeft()
while AInput == true do
camera.CFrame = camera.CFrame * CFrame.Angles(0, math.rad(2), 0)
task.wait()
end
end
local function TurnRight()
while DInput == true do
camera.CFrame = camera.CFrame * (CFrame.Angles(0, math.rad(-2), 0))
task.wait()
end
end
I put back the “camera.CFrame * (CFrame.Angles(0, math.rad(-2), 0))” because nothing i tried worked.