Racing Game Camera

Hi @Adam_Myhill ,

In the post When will Reactor be available? you mentioned that camera blending was used for a Need for Speed game. Could you explain a bit more how a similar racing camera would be implemented with CM? Expecially I would like to know what kind of game values would drive the cameras, what kind of virtual cameras would there be, what would be the default weights and if you would use camera blending explicitly to drive all car camera behaviour or would you also be modifying some virtual camera values by script.

In the linked post you also said to use lots of different virtual cameras and blend between them. So, how can I increase the max number of virtual cameras supported by the mixing camera to be more than 8?

Thx

1 Like

I just realized that Cinemachine provided via Package Manager contains all the sources so the limit of 8 virtual cameras can probably be solved by changing the MaxCameras const in CinemachineMixingCamera.

Indeed it can. However, don’t just change the constant, look also in the code for comments indicating other things to change as well. If you don’t want to modify the package sources, you could just copy the class and make the changes in the copy.

I didn’t know it’s possible to literally overwrite the imported type definition. Thanks!

You’re not overwriting it, you’re making a new one. You have to rename the copy, so that it becomes a new class. A custom vcam.