- I’m trying to make a free camera. I want the camera to turn to the left or to the right depending on if I’m pressing “q” or “e”
The issue is that I can’t seem to find a way to make the camera rotate correctly.
This is what happens,
https://gyazo.com/87d4e6bcd2f96396bb016ad7170bd0a0
rs.RenderStepped:Connect(function(delta)
if holdingw then
cam.CFrame += Vector3.new(0,0,-0.1)
end
if holdings then
cam.CFrame += Vector3.new(0,0,0.1)
end
if holdinga then
cam.CFrame += Vector3.new(-0.1,0,0)
end
if holdingd then
cam.CFrame += Vector3.new(0.1,0,0)
end
if holdingq then -- this line
cam.CFrame *= CFrame.Angles(0,math.rad(0.5),math.rad(0.5))
end
--[[ if holdinge then
cam.CFrame *= CFrame.Angles(0,0,math.rad(-0.1))
end ]]--
end)
- I’ve tried using almost every combination of CFrame.Angles, CFrame.FromOrientation, CFrame.FromEulerAnglesXYZ/YXZ, CFrame, and some others that I forgot.