Vehicle seat why does the camera go over the player head when seated?

I’m making a car in my game and when ever i sit in the vehicle seat the camera goes into the ceiling.

I have tried the Following:

  1. local player = game.Players.LocalPlayer
  2. local camera = game.Workspace.CurrentCamera
  3. camera.CameraType = “Custom”
  4. camera.CameraSubject = player.Character.Head
    The problem with this is that the camera does not follow the car anymore.
    How do i fix this?

any help on this is greatly appreciated :slightly_smiling_face:

1 Like

Try setting the camera subject to the car, not the player. Also, if the position bothers you, you can always set it’s position/CFrame.

For info on camera manipulation, look here:

Hope this helps you :grinning:

I tryed what you said setting the cameraSubject to the car and the camera moved to the center of the car so that did not work. Also tryed CFrame and didn’t work. Is there away that i can offset the vehicleSeat so that its not 5 studs higher than the player?

thanks for the help :slight_smile:

The camera going to the center of the car sounds like a problem with your zoom. Try setting the camera zoom to something a bit larger by setting the max zoom and minimum zoom to your desired zoom value, like here: Unlock Camera:Zoom(distance) (see Tiffblox’s reply).

You can the return it again when the character leaves the car seat.

my game has the cameraMode = ‘LockFirstPerson’ for all players so i can’t zoom in or out.
This is what i am trying to do:

as you can see in the video the player is below all the controls, that’s because the VehicleSeat stud offset is higher than the players head. So it looks wired but necessary so that the camera doesn’t go into the ceiling.

I want the camera subject to be the vehicleSeat so that i can drive around and have the mouse follow the car like in the last seconds of the video.

mmm… how do i fix this :slight_smile:

Sorry for such a late reply! Try switching the camera type to player.Character.Humanoid. It should act like the camera is in the head. Not only this, it will follow the player constantly. Hope this reply helped if you hadn’t found the answer to your question!

1 Like

The camera is now in the player head like i want but it now does not follow the car, by follow i mean rotate with the car. I don’t know what to do. Thanks for the help though.

Unfortunately, you can have the camera follow the player or you can have it follow the car. If you want it to follow the car but don’t mind about this, then set Camera.CameraSubject to a part in the center of the car.

If you want it to behave like a normal camera, but from within a car, then keep the Camera.CameraSubject property to the player.

You can have either, but not both.

1 Like

Set the camera type to ‘Follow’ when in car.

I tried that and it works but not when your in first person.

Then set the camera minimum zoom to 3 (or something similar) to stop them going in first person.

1 Like

my game is mostly in first person and when your in the car is where i want it the most.

So i have tried to set cameratype to well all of the options didn’t work and same with camerasubject. I have also tried CFrame and still didn’t work.

ok back to the beginning you have a simple car and you add a vehicleSeat and weld it to the floor of the car then click the play button and go onto the car seat great you can now drive around but you soon notice that if you turn in any direction you have to take your mouse and drag it to the front window again which i find very annoying. and that is what i am trying to solve but so far no luck.

I feel like i am missing something. :thinking: