New version of Cinemachine 3 pre-release 7 is now available

Cinemachine 3.0.0-pre.7 is now available. The focus this time is on blending.

Please remember that this is still a pre-release, so back up everything before upgrading. If your project is making significant use of the Cinemachine 2.X API, think carefully before upgrading, it might be a lot of work. See our upgrade guide here.

Installation
Minimum Unity version: 2022.2.16f1
Window → Package Manager → + → Add Package By Name
Name: com.unity.cinemachine
Version: 3.0.0-pre.7

Upgrading
What’s new in cinemachine 3
Upgrade from cinemachine 2.X

Changelog

  • Added CinemachineCore.GetCustomBlender and BlendCreatedEvent to allow custom blend behaviour.

  • New Custom Blends sample scene illustrating how to customize the blend algorithm.

  • CinemachineChannels can now be named via the CinemachineChannelNames asset. The OutputChannel struct has been removed.

  • Added CinemachineCameraManagerEvents behaviour.

  • Improved handling of nested blends.

  • Added the option of defining CINEMACHINE_NO_CM2_SUPPORT, to lighten the package by removing legacy CM2 support.

  • ThirdPerson Shooter sample scene now has an option to swap shoulders.

  • CinemachineCameraEvents and CinemachineBrainEvents and CinemachineCameraManagerEvents can be added to any GameObject, not only to the target objects.

EDIT: 3.0.0-pre.7 is identical to 3.0.0-pre.6, only unit tests are slightly different.

10 Likes

I have an issue with pre-release 7, but I don’t see a thread for it yet so I’ll put it here (upgraded from pre-4).

After updating my blend is not functioning as expected. It’s a default blend between 2 virtual cameras, nothing crazy. It is properly blending the ortho size and position, but NOT the rotation. The only thing I did was update from pre-4 to pre-7, and I had to update a few calls to Priority to Priority.Value to account for the API change. Is it expected that something like this could break with the recent blend updates? Thanks!

Blending logic has changed. The main change is how nested blending is handled (i.e. [[a to b] to c]). Can you show me what’s happening, or better still, send me a repro scene?

1 Like

I’m having an issue with this build.

Cinemachine brain on a split screen camera will throw the exceptions shown in the screen shots and will not recover. I have to restart the game or that player will always be unable to rotate.

It’s something to do with CinemachineRotationComposer and happens when a player dies and respawns (teleports) and the camera was “inside a block” according to one of my playtesters.

Please tell me how to fix or should I just wait for a new build. It seems like we are due for a new build.

Here’s the line 220 where the warning is being raised: 9177011--1277891--upload_2023-7-27_22-1-53.png

This is very interesting. Can you isolate it in a repro project and send it to me?

I can not. I can’t even reproduce it reliably. Tends to happen every 10 minutes or so when a player respawns.

Is there a reason why the m_Speed field has been omitted from the CinemachineSplineCart.cs? It was a really useful feature in the CinemachineDollyCart.cs? I’m certainly be adding the functionality back in - just wondering why Unity Technologies omitted it. The comments in the new version even allude to speed.

What do you mean “inside a block”?

It’s still there, you just have to enable it in the the Automatic Dolly section. It’s done this way in order to support alternate auto-dolly algorithms.

9189674--1280741--upload_2023-8-2_14-18-26.png

Sorry, I meant that I suspect the CinemachineDeoccluder is active and dollying forward when the player respawns and teleports and causes the bug.

I’m also setting the axis values on teleport, which could be related:

        public void Goto(Vector3 position, Quaternion rotation)
        {
            if (DebugLogging)
                Debug.Log($"Player {Number} Goto {position}, {rotation.eulerAngles}");
            Movement.Motor.SetPositionAndRotation(position, rotation);

            var orbit = GetComponentInChildren<CinemachineOrbitalFollow>();
            if (orbit != null)
            {
                orbit.VerticalAxis.Value = orbit.VerticalAxis.Center;
                orbit.HorizontalAxis.Value = rotation.eulerAngles.y;
            }
        }

Thanks for that :slight_smile:

Clearly my mistake.

FYI: I appreciate the changes made, and all those involved in the re-development who have made it. Having the various options and settings as separate components and removing the m_ naming certainly gets my tick of approval.

Cinemachine and Splines are my go to packages for a lot of what I do now. Having them work more closely is great.

4 Likes

I’ve been trying to repro your issue, but can’t make it happen.
Have you tried setting vcam.PreviousStateIsValid = false when you teleport the player? What happens if you add that?