Cinemachine 3.1.0 is Now Available

“Ah, Cinemachine, the insufferable creation that graces the digital stage with its presence. While I am loath to admit it, there is a certain cunning in its design, a subtle artistry that even I cannot deny. Though I abhor its very existence, I cannot help but acknowledge its effectiveness in crafting scenes of deceptive beauty. It is a tool of the craft, albeit one that I concede possesses a modicum of talent.”
– Severus Snape

Update: 3.1.1 has been released.

Release Notes:

In this release, we’ve added a couple of new extensions:

  • CinemachineShotQualityEvaluator packages the shot quality evaluation code from CinemachineDeoccluder so you can use it in situations where you don’t want the Deoccluder.

  • CinemachineDecollider keeps the camera on top of terrains, and prevents it from intersecting objects. Unlike CinemachineDeoccluder, it makes no attempt to preserve the line of sight to the target.

We’ve also added a new sample scene: FlyAround, which shows one way to implement a free-flying camera.

We’ve updated the sample character controller code to be more versatile, allowing the character to walk on arbitrary surfaces. The FreeLook on Spherical Surface sample scene (pictured above) shows this in action. We encourage you to use our sample code as a starting point for implementing your own character controllers.

Other additions:

  • CinemachineDeoccluder has the option to resolve towards the Follow target instead of the LookAt target.
  • Added StateDrivenCamera.CancelWait() method to cancel the current wait on a pending state change.
  • Added IgnoreTimeScale option to InputAxisControllerBase.
  • Added confirmation dialog when exiting play mode, if Save During Play is enabled and changes have been made to saveable properties.
  • SplineDolly and SplineCart: position on spline is preserved when units change.
  • Axis recentering happens independently on axes with differing recentering times, so that input on one axis does not impact the recentering state of the others.
  • Replaced SameAsFollowTarget with RotateWithFollowTarget (SameAsFollowTarget still exists but is deprecated).
  • Deoccluder evaluates shots in the Finalize stage instead of Aim.

Bugfixes:

  • Index out of range exception when adding a CM Shot to a timeline track whose CinemachineBrain is inactive.

  • OrbitalFollow with 3-ring setup inappropriately damped in response to vertical input if LookAt and Follow were at different vertical positions.

  • StateDrivenCamera min activation time was broken.

  • Solo was not updating with the CM Brain in FixedUpdate.

  • Spline roll was being calculated incorrectly when the spline was rotated.

  • “Freeze When Blending Out” blend hint didn’t work when switching between two cameras multiple times.

  • Cinemachine cameras would sometimes unnecessarily dirty the scene due to floating-point imprecision when setting transform rotations.

If you are currently using Cinemachine 2.X:

Please note that not everybody using Cinemachine 2.X needs to upgrade. We will continue to support CM2 for some time.

Before upgrading to Cinemachine 3, check if you have custom scripts that make significant use of the Cinemachine API. If so, it may be better to stick with previous versions. And, although we provide a tool to convert project data, there is currently no automated way to migrate code. The Unity API updater can’t take care of all the API changes, so this will require a manual upgrade.

If you are using Cinemachine “out of the box” without any custom scripting using its API, the upgrade process will be relatively easy.

Resources

For more information, please have a look at:

Requirements

  • The minimum required Unity version is 2022.3
  • The recommended version is Unity 6

Getting started

  • Open a new project through the hub
  • Go to Window > Package Manager
  • Search for Cinemachine in the Unity registry
  • In the version history select 3.1.0
14 Likes

1: In package manager there is no option for the new version.
2: virtual cameras… there is no way to move the camera with user input in the new input system. this system is not working with new input at all!!!

It is available in the package manager in Unity 6. With Unity 2022.3, you have to explicitly ask for it, as detailed here .

Moving the virtual camera does indeed work, and it works correctly with the new input system. How did you move the camera? What steps did you take exactly?

how to add virtual camera

In CinemachineCameraEvents.OnCameraDeactivated, CameraActivatedEvent is invoked instead of CameraDeactivatedEvent

It’s fixed in the upcoming 3.1.1, thanks for reporting!

Docs saying that Instance is removed from CinemachineCore…

9914892--1433160--upload_2024-6-29_11-11-28.png

…with all properties and methods remaining, but I can’t find GetActiveBrain on it:

9914892--1433163--upload_2024-6-29_11-12-5.png

Where’s it?

VirtualCamera instances are broken in prefabs - no way to upgrade:

9914895--1433166--upload_2024-6-29_11-14-33.png

Prefab has GO with VirtualCamera component, after updating package.

Unity 6 0.7f1

GetActiveBrain and ActiveBrainCount are now static methods on CinemachineBrain.

1 Like

The way to upgrade prefabs is to upgrade the entire project. Find (or create) a CinemachineVirtualCamera component somewhere in a scene, and use its inspector to upgrade the entire project. Prefabs will be included.

Great, can we please update docs, because this is not what it’s written there:

9915102--1433202--upload_2024-6-29_15-5-55.png

Source: https://docs.unity3d.com/Packages/com.unity.cinemachine@3.1/manual/CinemachineUpgradeFrom2.html

1 Like

Thanks for quick response during a weekend, BTW.

Hey, where did all the different settings from the Virtual Camera went:

  • Transitions
  • Body
  • Aim
    And most important is the virtual camera gone? I’ve seen the screenshot above, but I mean there is no Virtual Camera, or are the targeted cameras virtual cameras?

I’ve also noticed that the Add extension drop down menu is broken (at least for me) I can click it once and then never. Only when I close and reopen my unity project I can click it once again.

With CM3, there is a significant API and data structure change. If you are upgrading an existing project, you are not expected to keep the CM2 virtual cameras, you are instead expected to upgrade them to their CM3 equivalents. This will require some work, it’s not a single-click upgrade.

If you’d rather not do this work, we recommend that you stick with CM2, the latest release of which is detailed here: https://discussions.unity.com/t/951450

Please see the upgrade guide here: https://docs.unity3d.com/Packages/com.unity.cinemachine@3.1/manual/CinemachineUpgradeFrom2.html

NoNo I have not been upgrading. I use Unity 6 where the CM3 is standard.
I guess I’ll just check the docs and see if I can bring to work what I had in mind with CM3. Is there any specific section that explains where the old stuff from the virtual camera went? Also thanks for replying on a weekend, much appreciated!! :smile:

Everything is still there. Instead of Body and Aim, you have Position and Rotation, in the Procedural section of the inspector. When you select something from the dropdowns, new behaviours are added to implement the functions. Instead of being in a monolithic inspector, it is separated into behaviours. The functions are the same, the names and the form are different.

See the blog post here: https://unity.com/blog/engine-platform/see-whats-new-with-cinemachine-3

Hi guys, i’ve been setting up my third person action game to use Cinemachine 3.1.1 (under Unity 2022.3) and it was working all well till I’ve encountered a nasty problem.

While using Cinemachine Mixing Camera component and 3 different Virtual Cameras to drive my views (standard third person, aim and crouched) I’ve noticed that while rotating the camera and engaging a blend between Standard and Aim (or any other combination) the cameras have a tendency of getting their transform rotation out of Sync for some reason. All of them are updated Always and all of them are pointing where the player is looking but during the blend something happens and I can’t figure out what.

Their tracked target is our player of course.

Any suggestions would be incredibly appreciated as my only alternative is to only have one virtual camera and make settings presets to blend back and forth with my own component rather than having virtual cameras as camera configuration holder and leave the mixing component handle it.

EDIT:

Btw this never happens if wait for the blending to be done before moving the camera so there must be some mistake going on during blending. If I were to bet I would say that input movement is being scaled by weight while the two cameras are blending, I’ve yet to dig through the code to find out.

I can’t really say what’s going on just based on a text description. Would you be willing to send me a test project that shows this happening?

Unfortunately i cannot share the project but I can show you the setup and a video that illustrates the problem.

Here’s how my main camera is set up:

The other two have a small difference in the Orbital Follow component and in the Camera Offset:


Although I’m pretty sure these don’t make any difference in the issue I’m about to show.

So here’s a video with the issue: While moving and switching the camera normally all the cameras are aligned and there’s no issue, if I blend the cameras when moving them they desync.