Offset camera according to the tilt of the players head (3rd person camera)

Hey there.
I am currently working on a third person camera, but i have run into an issue.
What i want is for the player’s camera to be offset from the player’s head.
Problem is, i’m not the best with my maths in this area. Obviously adding
a Vector with the value of the offset means it will not always be on the
same side of the player’s head no matter which way they are facing. I also
don’t want the camera to wobble because it is attached to the head.

When the player tilts their camera up or down, I want the camera to change
height according to how tilted the player’s head is, and to always face the way the player is facing.
This is what i have now

https://gyazo.com/4b158aa373f811645fd4a895f2d1cd23

The camera also glitches, have I done something wrong?
Thanks

  • Mezza
1 Like

How often are you updating the camera position? I’m not entirely sure but try making it update quicker. Couldn’t tell too much from the video but that’ll make it look less skippy.

1 Like

@landonis Right now im just setting the humanoid CameraOffset.

1 Like

So just every frame? It almost looks like it just jumps too far, play with the values and try and make them smaller. Without seeing code that’s the best advice I can give. Good luck!

1 Like

To offset the camera im using

hum.CameraOffset = hum.CameraOffset + Vector3.new(5,4,4)

But i want a way where the camera will always be Vector3.new(5,4,4) away from the camera, but always on the right side

1 Like

Maybe look at this post as a way to help you find your solution to your problem or just use this as your camera script, it may or may not help.