Driving a better Vehicle Camera

One of our jobs at Roblox is making sure that developers can create immersive experiences quickly and easily with fully featured, drop-in gameplay systems.

In that vein, we’ve just turned on a change that improves the Roblox vehicle camera. The result is a more fluid, dynamic camera view that gives you a clean shot of the action without inducing motion sickness.

  • Camera auto-rotates only when you move the vehicle/start driving
  • Improved pitch angle when driving on slopes
  • Camera detaches when vehicle spins quickly
  • Camera centers on the vehicle
  • First person view is handled in a more realistic way, so it feels like you are sitting in the vehicle

Deep Dive

AutoCorrection improvements

Remember how your car camera rotated behind you forcefully, even when you were stopped?
It doesn’t do that now.

AutoCorrection is now gradually engaged as you move forward to help you ease into a good view. It never engages when you’re stopped.

Camera pitching

Driving up slopes used to result in a strange pitched view, making it hard to tell where you’re going. The new camera now loosely follows your pitch angle, giving you a better view.
This works for arbitrary gravity vectors, so you can make a wall-riding car game if you so choose.

Camera centering

The old car camera was always centered on your avatar, resulting in an odd offset views in third person.

To fix this, we came up with two rules:

  • In third person, the camera is centered on your vehicle’s bounding sphere.
  • In first person, the camera is centered on your avatar’s head.

Rotation velocity cutoff

It’s easy to make a camera that can cause motion sickness. If a car hits a wall and spins out, your camera would normally snap around.

This is solved with a rotation velocity cutoff. The camera progressively detaches from the car’s orientation when the car spins fast enough, preventing sharp view changes.

Tunable variables

Every game has it’s own unique feel and gameplay style. The new camera exposes a number of variables for you to tune to fit your game.

  • Pitch camera stiffness
  • Yaw camera stiffness
  • Auto correction delay time
  • Auto correction min ramped car speed
  • Auto correction max ramped car speed
  • Auto correction smoothing
  • Rotation cutoff min ramped pitch velocity
  • Rotation cutoff max ramped pitch velocity
  • Rotation cutoff min ramped yaw velocity
  • Rotation cutoff max ramped yaw velocity
  • Pitch base angle
  • First-person camera stiffness multiplier
  • Rotation cutoff rising yaw response
  • Rotation cutoff falling yaw response
  • Rotation cutoff rising pitch response
  • Rotation cutoff falling pitch response
  • Initial zoom radius, as a fraction of your car’s size
  • Third person camera center offset

We’ll be exposing methods to customize these externally without forking the PlayerScripts in the near future.


This is currently available in any game that uses the default Roblox PlayerScripts.

Please let us know if you have feedback or suggestions for future improvements; our team would love to hear it.

173 Likes

Can we have an option to disable Vehicle Camera altogether?

Some of us including players would definitely appreciate that.

Something like VehicleSeat.CameraEnabled could work


  • I agree
  • I disagree

0 voters

42 Likes

Are we able to customize the autocorrections?

7 Likes

This has caused a number of vehicle games to revert to a previous camera script because it ruins the gameplay for their type of vehicle. Please make it togglable for those who dont want this camera option

39 Likes

I agree, as while it IS neat to have something like this, it would be insufferable for most people

6 Likes

Wow this is amazing! Having this be done in the core engine instead of developers having to implement a smoother system is truly convenient.

I have a question: do the rotation velocity cutoff and camera pitching happen even in first-person? I’d think so, but at the same time not as well. if the camera detaches from first-person, isn’t that reverting to the way it was before, which is undoubtedly unrealistic? How is this situation dealt with?

A cool thing that can be done with the “third-person camera offset” is that devs can tween it systematically so that the camera shifts around, especially during high speeds. This can be used to emulate loss of control and shaking, which is what happens when a car is going fast.

Believe it or not, minor changes like this help entire new genres of games to be encouraged, in this case, devs do not feel that overwhelmed anymore in creating a racing game, which is just going to get better with these updates.

Keep it up Roblox! :roblox: :roblox_light:

I appreciate the intentions and this could be extremely helpful for some… But not for everyone.
As a mobile obby player it is extremely hard to keep the camera where I want it, and I’ve received feedback from some other people have been experiencing this issues too.
Can this be converted into a “camera mode”? Like the shiflock, classic or follow that can be changed in-game. That would be pretty useful

12 Likes

I really like these changes, and they should have been made 4+ years ago, but this will certainly break a lot of people’s games. It’s already been suggested multiple times in this thread, but it should be customizable or toggleable.

8 Likes

Does this new feature have to do with this new bug?

4 Likes

Basing this off of the fact that the first reply on this post was from 30-ish minutes ago, and that we were just notified in the DevForum Discord about this today, I’m gonna guess this post was just released today.


I have issues with both forms of the camera system, but my primary issue with this update is that it was pushed to players without notice, leading to bug reports and vitriolic “feedback” blaming game developers for the camera mishap. See: Option to remove the new forced VehicleSeat camera - #3 by so_norm, (Breaking my game) StarterPlayer.DevCameraOcclusionMode is set to "Invisicam" with VehicleSeat camera breaks - #6 by RobertTBS.

While I’m all for Roblox taking an active role in improving developer experiences, I’ll echo my fellow posters when I say that this should never have been a forced change. Users and games that are used to the previous camera behavior are currently suffering from the effects of this change. A better workflow would have been, as has been done for many other updates:

A beta feature for testing => A rollout to all users, with opt-in being the default => If necessary, a transition to this as default behavior, with the previous system being optional

For anyone that’s looking for a solution, @addisonshiu has one:

15 Likes

The saying goes, “If it ain’t broke don’t fix it”. I stand by that. You totally broke driving games like Ultimate Driving, R&N Driving, and almost any other game with vehicles because the camera in vehicleseats now spins with arrow keys, no matter what you do to the camera mode.

All in all, as others have said, this would have made a good beta feature. I’m disappointed how roblox doesn’t ask most developers how they felt about this before shoving it into all games and possibly destroying key points, as in driving games.

Here I have listed a YT video of what now happens. (360p because youtube sorry)

Note that
A: in my game you have to use arrow keys to drive otherwise all of the keybinds get messed up.
B: This has happened in the past and all times it has been reverted within a day
C: I had to make my game private because I was afraid of people disliking from the error
D: This update also causes you to be unable to spin your camera with your mouse after you enter the vehicle
E: Why wasn’t this pushed out publicly earlier? I just now saw this, and only after @Deferend linked to a post I made earlier. Was this intentional?

Please revert this soon, It was good in theory but because it wasn’t tested properly before publishing, it turned out to be a big mess.

19 Likes

OMG, totally loves it. I hate it when cars auto rotates the camera even when stopping aaaa

4 Likes

I’d have to agree with this statement due to the fact it affects certain games to the point it can be bothersome. Other than that I think these improvements are a great start to a new vision regarding vehicles on Roblox.

1 Like

Like @rogeriodec_games said, setting a camera’s CFrame is not working anymore, and even in baseplates it is throwing back an error to some module related to his update? Is Roblox going to fix this?

3 Likes

Is there a way to disable the automatic panning with a script? It could be useful for train games where you want to see all the detail that’s on the front but in only 2 seconds your camera reverts to behind your character

2 Likes

Haven’t tested but it could be the reason.

1 Like

Looks good, but I’m curious why there’s no roll to the camera? I understand the body’s normal inclination is to keep our heads level on roll, but at some point that would not be possible (e.g. taking a 60° bank at high-speed).

2 Likes

Looks like I am encountering a bug with camera bug now.

When I jump out of a vehicle seat while holding S, I am automatically locked into shift lock for some reason. I can use my mouse wheel to zoom in and out and quickly fix this problem, but it so bugging that it is a thing :face_with_raised_eyebrow:

I am using A-Chassis 6.52 shown in the video, and this is the place that I recorded the bug on, though it looks like it’s universal for me:
https://www.roblox.com/games/5690491864/J4s-ns-Place-Number-42

The video demonstration is right here:

Can we have a fix on this matter if we can please? Thank you!

3 Likes

@subcritical

This update is causing the following message to be spammed in my output console when the player joins the game, and it’s super annoying:

image
I had to fork the PlayerModule and insert a little debug information to find the traceback for this:

(line numbers are shifted up 1 because of my debug statement)

I have my “CameraType” set to “Scriptable” through my own scripts; setting the CameraType to Scriptable and then updating the value of CameraSubject is all you need to reproduce this.

It seems to go through this line, with a FFlag related to this new vehicle camera, and tries to activate a default camera module based on the CameraType:


Since the CameraType is Scriptable (and there is no current active camera module), it doesn’t select any new camera module to activate, and then complains about it:

Please fix this. I hate having random output for something that’s not my fault.

15 Likes

The new first person camera is REALLY good, but the third person camera is flat out just bad. Why does it move when we’re holding down right click?

edit: Wow, you guys fixed it! We can now hold right click for as long as we want with the new vehicle camera. THANK YOU!!

9 Likes