Help with Lerping Angles :))))))))) (the bigger the smile the more the bumps)

So Basically i have a script that detects walls on the side of the player using raycast and then makes the player and camera face parallel to the wall.

the problem is that when the camera changes its direction it’s too snappy it directly changes to the new direction which makes it look too bad. I want to make the camera smoothly change the angle using lerp.

cam.CFrame = CFrame.lookAt(head.Position, head.Position + ToCFrame) * CFrame.Angles(0, math.rad(-90), 0) * CFrame.Angles(math.rad(AngleX),0,0) * CFrame.Angles(0,0,math.rad(13)) * HeadOffset

the line above is what I use to change the camera direction. The Bold part mainly controls the horizontal direction (which is what I need to lerp I want the rest to continue behaving as they are) I don’t want the camera’s position to be lerped I also don’t want the camera’s up and down orientation to be lerped.

  1. How can I lerp only the camera’s angles and not its position.
  2. Can you help me change the code above so that it works how I want it?

I know I’ve seen posts about moving a camera smoothly for things like head bobbing, vehicle movement, or pet movement, but I don’t recall which ones exactly and if they’d be of any help.

Try using the Search tool using ‘smooth camera movement’ or ‘smooth camera vehicle’ or ‘smooth pet movement’ to see if you get any hits on those kinds of subjects that might help you out with CFraming it.