Camera Tilting Problem

This has been bothering me for months now and i still havent figured it out.

I want to tilt my camera 15 degrees in the Z axis, but when I is use the CFrame.Angles method, it does tilt the camera but it gets left behind. I would appreciate all help and will update when I have finally solved the problem

For more details:
This is for a fly script I’m making, if I press A or D the camera tilts in the Z axis.

Can you provide the script that you use to achieve that?

TS:Create(Camera, TweenInfo.new(.3, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false), {CFrame = Camera.CFrame * CFrame.Angles(0,0,math.rad(15))}):Play()

This is in a local script

it does tilt the camera but it gets left behind
can you explain this part? i don’t get it;
“left behind”

1 Like

When you tilt the camera, it anchors to the position on where it was tilted.

Have you tried lerping the camera instead of tweening it? It might take a while for the tween to create and complete.

ohhhhhhh, so after it tilts you want it back to normal?

No, I want it to tilt while it’s still attached to the character

No, not yet. Can you provide a solution?

yeah; i got it i have an idea
you could probably set some anchor point example:

head < the anchor point here
now just rotate the camera while it’s staying in the anchor point
im really bad at pseudo code but i think that’s how i see it

As mentioned above you should be lerping every frame, your issue is that you’re telling the TweenService to lerp the camera to the current cframe * angles, but you’re moving so when the Tween is played you’re no longer on that exactly CFrame.

This somehow worked, tysm.

It’s a bit glitchy but it works.

TS:Create(Camera, TweenInfo.new(.1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false), {CFrame = Character.HumanoidRootPart.CFrame * CFrame.new(0,3,15)}):Play()

1 Like