Alter CFrame to move camera towards LookVector

I’ve read this:

but don’t understand how to move the camera in Studio towards its LookVector, I tried:

-- not new to CFrames, but never tried doing this before
local cam = workspace.Camera
cam.CFrame = CFrame.new((cam.CFrame.Position +  cam.CFrame.LookVector) * 0.8)

This won’t work for all angles.

have you tried to just add the lookvector?
if you add a vector3 to a cframe, you translate it by world space.

cam.CFrame = cam.CFrame + (cam.CFrame.LookVector * 0.8)
1 Like

For some reason that makes the camera ‘flip’ when ran in succession, why?

I’m not sure.
have you set the camera type to scriptable?
Do you have any other code affecting the camera?

I just coded it up to check, and it’s working fine for me.
camera example.rbxl (17.9 KB)

2 Likes