Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Official New version of Cinemachine 3 pre-release 4 available

Discussion in 'Cinemachine' started by antoinecharton, Feb 17, 2023.

  1. antoinecharton


    Unity Technologies

    Jul 22, 2020
    Hello everyone :)! We’ve just published a new version of Cinemachine 3.0.0. Make sure to back up your beautiful projects before installing. Especially if upgrading from a 2.x.x version.

    Let us know what you think.


    Screen Shot 2023-02-17 at 1.50.png


    Minimum version: 2022.2.5f1
    Window -> Package Manager -> + -> Add Package By Name
    Name: com.unity.cinemachine
    Version: 3.0.0-pre.4

    Upgrade guide

    Upgrade from cinemachine 2.x



    • Progress bar added to Cinemachine Upgrader.
    • CinemachineDeoccluder is a new class, not just a rename of CinemachineCollider.
    • CinemachineAutoFocus extension is now available for built-in and URP pipelines, with reduced functionality compared to HDRP.
    • Camera.focusDistance is driven by CM when the camera is in physical mode.
    • Confiner2D provides API to adjust the confiner to the current window size when the lens or aspect changes.
    • TargetGroup now ignores members whose gameObjects are inactive.
    • Cinemachine Samples can import their package dependencies.
    • CinemachinePathBase search radius fixed for not looped paths.
    • Add SplineAutoDolly.ISplineAutoDolly.Reset() method and SplineAutoDolly.Enabled flag.
    • Confiner2D and Confiner3D support smooth stop at bounds edge.
    • URP: add temporal effects reset on camera cut.
    • Add Weight setting to CinemachinePostProcessing and CinemachineVolumeSettings.
    • GroupFraming also works on LookAt target.
    • Several new Sample scenes were added.
    • Improved performance of CINEMACHINE_EXPERIMENTAL_DAMPING algorithm.
    • Path gizmo drawing was optimized.
    • Confiner2D does less gc alloc.
    • CinemachineSmoothPath is upgraded to Splines correctly now.
    • InputAxis refactor for recentering and momentary axis support.
    • CinemachineIndependentImpulseListener renamed to CinemachineExternalImpulseListener.
    • CmCamera is now CinemachineCamera.
    • The SimpleFollowWithWorldUp binding mode has been renamed to LazyFollow.
    • CinemachineExtension API changes to VirtualCamera, GetAllExtraStates, OnTargetObjectWarped, and ForceCameraPosition.
    • Third person shooter sample use object pooling for the projectiles.
    • CinemachineConfiner is deprecated. New behaviour CinemachineConfiner3D to handle 3D confining. Use CinemachineConfiner2D for 2D confining.
    • 3rdPersonFollow and 3rdPersonAim are deprecated and replaced by ThirdPersonFollow and ThirdPersonAim respectively.
    • Regression fix: POV and PanTilt handle ReferenceUp correctly.
    • Bugfix: Lens blending was wrong.
    • Bugfix: CinemachineDeoccluder Pull Forward strategy only pulls forward even with Camera Radius bigger than 0.
    • Bugfix: Extensions were not respecting execution order on domain reload.
    • Bugfix: AxisState was not respecting timescale == 0.
    • Bugfix: priority ordering was wrong when the difference between any priority values were smaller than integer min or bigger than integer max values.
    • Bugfix: Very occasional axis drift in SimpleFollow when viewing angle is +-90 degrees.
    • Bugfix: Physical lens settings were not being properly applied.

    Attached Files:

    Last edited: Feb 17, 2023
  2. Walter_Hulsebos


    Aug 27, 2015
    That looks really good!
    Seems like some nice new functionality and general improvements.
    Great samples too, I'm especially happy with the good practices being shown, such as using Object Pooling in them.

    I would, however, like to request the addition of a shoulder-swap feature to the "ThirdPerson Shooter" 3D Sample.
    Doing so would not only bring the sample closer to what's used in production but would also provide a valuable jumping-off point for game developers looking to create high-quality third-person shooter games, maybe it's a feature they hadn't even considered yet.

    Here's a list of some great titles that use it, the only modern third-person game I can think of that doesn't have it is Fortnite, but that could've been a conscious choice to change tactics or discourage peeking.

    It's a feature that'd be especially helpful to show to devs that are looking to create third-person cover shooters, those types of games always have the feature.

    Overall, great additions!
    Keep it up
    Gregoryl, antoinecharton and gaborkb like this.
  3. Gregoryl


    Unity Technologies

    Dec 22, 2016
    @Walter_Hulsebos Great suggestion for the shoulder swap. We love getting feedback, that's the whole point of pre-releases. Keep it coming!
  4. buc


    Apr 22, 2015
    A feature I have in my custom Orbit-Camera and missing in Cinemachine:

    For example when you are in a dense forest with very thin trees, you don't want the camera to find a new position every time, because this is very stressful to look at and also destroys the feeling that you are hiding or sneaking.

    So a feature to ignore thin colliders when they are further away than distance x would be very helpful.

    I can remember that trees set with unity terrain engine could not be distinguished from the terrain itself. This problem I have solved by checking the angle: when closer to the ground the colliders are not ignored, because this might be the terrain ground, when looking "quite straight" forward the tree colliders have been ignored.
    Last edited: Feb 21, 2023
    Yuchen_Chang and antoinecharton like this.
  5. antoinecharton


    Unity Technologies

    Jul 22, 2020
    Interesting idea. Looks like some features of the deoccluder can't be used with terrains. Will see if we could give a better solution for that.

    One thing you could do in your case is using layers. It is possible to exclude layers with the Transparent Layers field on the deoccluder component. Assign the trees prefabs you want to be excluded to this this layer. Then in your Terrain settings set Preserve Tree Prototype Layers to true.

    Your deocluder settings
    Screen Shot 2023-02-21 at 3.18.png

    Your tree prefab Screen Shot 2023-02-21 at 3.21.png

    You terrain settings
    Screen Shot 2023-02-21 at 2.29.png
    Let us know if this could work for you.

    Thanks for the feedback.
  6. buc


    Apr 22, 2015
    Thank you for this detailed answer!

    If this doesn't cut through the object with the camera, but just ignores it if it's in front of the camera, then this is exactly the needed feature to switch from my custom solution to cinemachine.

    I wanted to test it, but I get the following errors. Tested with Unity version 2021.3.19f1, complete empty project, just imported cinemachine, default RenderingPipeline.

    Library\PackageCache\com.unity.cinemachine@3.0.0-pre.4\Runtime\Core\LensSettings.cs(196,53): error CS1061: 'Camera' does not contain a definition for 'focusDistance' and no accessible extension method 'focusDistance' accepting a first argument of type 'Camera' could be found (are you missing a using directive or an assembly reference?)

    Library\PackageCache\com.unity.cinemachine@3.0.0-pre.4\Runtime\Behaviours\CinemachineBrain.cs(1057,29): error CS1061: 'Camera' does not contain a definition for 'focusDistance' and no accessible extension method 'focusDistance' accepting a first argument of type 'Camera' could be found (are you missing a using directive or an assembly reference?)
  7. Gregoryl


    Unity Technologies

    Dec 22, 2016
    Minimum Unity for CM3.0 is 2022.2.5f1.
  8. whyatme


    Apr 4, 2021

    Attached Files: