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.
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.
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.
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.
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?)
Cinemachine 3.0 is not showing in my package manager. Any ideas why?
EDIT: I see now I have to “Add package by name”
IMO this should be documented. The official docs make it seem like it is available in the package manager and does not indicate this extra step Upgrading a Project from Cinemachine 2.X | Cinemachine | 3.0.1