Weird camera snapping on my plane

Camera snaps in and moves a little when in the center of the screen.
It’s currently using tweens i also tried using :lerp() but that didn’t fix it aswell.

Theres the code for the camera:

game:GetService(“TweenService”):Create(Camera, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {CFrame = CFrame.new(Jet.Camera.Position, mouse.Hit.Position)}):Play()

I would appreciate any help! (ignore the camera spin at the end i closed the window thats why it’s like that)

Just for more info, what does it look like when not using tweens or lerp? When the CFrame is sent directly does it behave differently?

Is the Camera set to Scriptable? Even Fixed causes some problems.

It’s set to scriptable on a render stepped loop and when theres no tweens or lerps its spins around like crazy.

I recommend not using CFrame.new, because it is deprecated, and you should use CFrame.lookAt instead. Use the third argument and specify the character’s HumanoidRootPart.CFrame.UpVector. This should make it slightly more stable and realistic, if I’m right.

1 Like

I’ve tried it, the camera movement is smoother but it snaps even crazier now.

“Snaps” doesn’t really describe anything. Let’s do some debugging.

After getting in the plane, what is the CameraType of the camera? Don’t print it out, check from the explorer in the test mode.

The character is not in the plane but, its CameraType Scriptable when the “Smooth look” is on.

Theres the video that shows what i meant by “Snapping”

Very unusual. Try this:

When they get in the plane: Mouse.TargetFilter = workspace
When they get out of the plane: Mouse.TargetFilter = game.Players.LocalPlayer.Character

What this does is sets the mouse to ignore any parts of the plane, but I have not used this in a long time since I always parent the vehicle to the character.

When they get out of the plane, it sets it back to normal.

Thank you! it works flawlessly now.

1 Like