Giter Site home page Giter Site logo

com.unity.cinemachine's Introduction

Cinemachine

Smart camera tools for passionate creators

About Cinemachine

Cinemachine is a suite of modules for operating the Unity camera. Cinemachine solves the complex mathematics and logic of tracking targets, composing, blending, and cutting between shots. It is designed to significantly reduce the number of time-consuming manual manipulations and script revisions that take place during development.

Branching Strategy

Cinemachine default branch is main and that’s where the latest version of Cinemachine lives. For all other minor versions of Cinemachine, a new branch is created under release (e.g. release/2.9, release/2.8). These branches are maintenance branches.

During development, PRs are merged directly on main and maintenance branches. Those branches should always be shippable: the code compiles, features are complete and the CI pipeline is green.

Once a release is done, a branch with the version name is created under releases (e.g. releases/2.9.4, releases/3.0.0-pre.1). No changes are made to those branches. They exist for reference only.

Release Procedure

Cinemachine is a supported package from Unity, and as such, can be installed from the official registry in the package manager of the Unity editor. The Cinemachine Release Procedure is an internal document that contains different information to help with the release of a new version of Cinemachine.

com.unity.cinemachine's People

Contributors

aabao avatar antoinecharton avatar aras-p avatar ascendingman avatar bryanzakounity avatar erick-unity avatar etherelric avatar gaborkb avatar glabute avatar guillaumelevass avatar jamal-unity avatar jieyinglin avatar jwalker0007 avatar krisrok avatar manuh73 avatar mathieurivest avatar midopooler avatar omnomasaur avatar rainsing avatar rlevreau avatar sebastienduverne avatar svenrh avatar thomas-tu avatar unity-cchu avatar unity-nikos avatar vanhalteren-ca avatar volblob avatar walter-hulsebos avatar windxu88 avatar zippo445 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

com.unity.cinemachine's Issues

Documentation for Blend Hint and Trigger Action missing

Blend Hint: A more beginner friendly guide or example is needed, say, when we have 2 virtual camera that share the same target, how does blend hint work?

Trigger Action: Users will need to discover this feature by themselves, as it doesn't show up in the main menu for Cinemachine, nor the doc, only example packages.

CinemachineTargetGroup moves a transform.

I'm using Aim: Group Composer + CinemachineTargetGroup component. I found out that CinemachineTargetGroup moves transform it attached too.
If I disable the CinemachineTargetGroup component everything works fine.
Is this a bug? Or what I'm doing wrong?
cinemachine package version: 2.5.0
unity version: 2019.2.13f1

Cinemachine jitters while following moving (translating) transform even while using default settings of virtual camera

Cinemachine camera jitters while following moving transform.

Steps to Reproduce:

  1. Create a cube in scene
  2. Attach a script on above cube with following code in update
    transform.Translate(Vector3.forward * 50f* Time.deltaTime);
  3. Create a new virtual camera
  4. Assign cube into Follow and Look at fields of virtual camera and adjust track and aim offsets
  5. Observe the jitter

Sample project attached below
Cinemachine sample.zip

CinemachineVirtualCamera as Prefab Body Properties has no effect.

Here is what I trying to do.
I try to make fps cam by using 3rd person follow.
But when I Instantiate the CinemachineVirtualCamera prefab, Body Properties seems has no effect.
Because I find out that the first person weapon is judder , although I have completely set all parameters to 0.
So I try to change Body properties to Do nothing , then add Cinemachine3rdPersonFollow via code , set all parameters to 0, and it works!
Like this
image
It is a bug I think?

"AddCustomBlendable" changes behavior if more than 4 custom blendables present, breaking sync of m_Custom_Overflow and NumCustomBlendables

Here is the method AddCustomBlendable

        public void AddCustomBlendable(CustomBlendable b)
        {
            // Attempt to merge common blendables to avoid growth
            int index = FindCustomBlendable(b.m_Custom);
            if (index >= 0)
                b.m_Weight += GetCustomBlendable(index).m_Weight;
            else
            {
                index = NumCustomBlendables;
                NumCustomBlendables = index + 1;
            }
            switch (index)
            {
                case 0: mCustom0 = b; break;
                case 1: mCustom1 = b; break;
                case 2: mCustom2 = b; break;
                case 3: mCustom3 = b; break;
                default: 
                {
                    if (m_CustomOverflow == null)
                        m_CustomOverflow = new List<CustomBlendable>();
                    m_CustomOverflow.Add(b);
                    break;
                }
            }
         }

It starts by trying to find if the Blendable being added already exists inside the mCustomN properties or m_CustomOverflow list.

Let's assume it did find a previous inserted blendable equal to b.

If this happens, the method sets index to point to the previous value, and adds the previous weight to b.

If index is < 4, then b overrides the previous value, and everything is fine

But if index happens to already fall into m_CustomOverflow, the previous value is NOT overriden. Instead, it is added at a completely different index, namely m_CustomOverflow.Length

Since NumCustomBlendables is not updated, the value is mostly ignored. However the list is now out of sync with the counter.

CinemachinePath & CinemachineSmoothPath evaluations difference.

Given.
image
Basicaly we have CinemachinePath & CinemachineSmoothPath components with same waypoints (zero tangents).
The question is in CinemachinePathBase.EvaluatePosition(float pos). This function gives different values in depend on CinemachinePathBase concete class. It does not seem logical to me. Is it by design or is it a bug? In case if it is made by design, why? And how would I achieve linear interpolation on position for CinemachinePath?
Test code

public class CinemachineEvaluationTest : MonoBehaviour
{
	public Cinemachine.CinemachinePath path;
	public Cinemachine.CinemachineSmoothPath smoothPath;

	[ContextMenu("EvaluationTest")]
	public void EvaluationTest()
	{
		print("CinemachinePath.Evaluation result: " + path.EvaluatePosition(0.77f));
		print("CinemachineSmoothPath.Evaluation result: " + smoothPath.EvaluatePosition(0.77f));
	}
}

The result is
image

CinemachineTargetGroup::RemoveMember loses last array element's value.

Reproduction steps:

Unity 2018.3.7f1
Cinemachine 2.2.8

Create a target group with several elements (3 in my case).
Call RemoveMember() on the second array element (item @ index 1).
Note that the item in index 2 doesn't successfully migrate to index 1.

Looking briefly at the code installed with the package, it looks like it's an issue with using the wrong array for determining the length, causing the last value to get dropped from the second copy.

Looking at the code currently in the repository, it looks like it's been updated to account for this issue - but not in the case where the removed item is at the original arraylength - 1 (i.e, a problem with the conditional)

v2.8+ Freelook Y-Axis value can't be changed!

the current Y-axis value of freelook can't be changed manually, it automatically reverts back to default values of
"1, 0.5, 0" depending on the rig to which the gameobject is closest at start. issue is appearing in v2.8 and above.

in v2.7.9 setting the Y-axis value defines the starting position of the rig when the game is started. in the latest version there are specific tabs for top, mid n bottom rigs, & clicking on them to set their values automatically changes the current Y-axis value & it can't be changed back & it also glitches out sometimes to how it is in v2.7.9 but didn't seem to work. tried changing it via script also doesn't work.

The Blend Hint "Freeze When Blending Out" doesn't workj when switching betwen two cameras multiple times

When switching between Cinemachine Cameras, one of them having the Blend Hinter "Freeze When Blending Out", the freeze only works the first time I switch to the camera. The second time the position seems to be set to 0,0,0

The issue seems to be caused by not resetting m_SnapshotSource in GetSnapshotIfAppropriate when the Snapshot is reset.

if (cam == null || (cam.State.BlendHint & CameraState.BlendHints.FreezeWhenBlendingOut) == 0) { // No snapshot required - reset it m_Snapshot.TakeSnapshot(null); return cam; } // A snapshot is needed if (m_SnapshotSource != cam || m_SnapshotBlendWeight > weight) { // At this point we're pretty sure this is a new blend, // so we take a new snapshot of the camera state m_Snapshot.TakeSnapshot(cam); m_SnapshotSource = cam; m_SnapshotBlendWeight = weight; }

The first time I blend to the camera m_SnapshotSource is null (weights are 0).
Then I switch back to the first camera, m_Snapshot gets reset.

Second blend back to the camera with Freeze, no new Snapshot is taken as m_SnapshotSource is still the camera taken during the first blend, but the actual snapshot has already been reset (0,0,0 position etc.)
The obcious solution seems to be to set to m_SnapshotSource to null when the snapshot is reset.

CinemachineBrain not updated on UnloadSceneAsync frame

When two scenes are additively loaded, and then one of those scenes is unloaded using UnloadSceneAsync a CinemachineBrain referencing a VCam in the unloaded scene will only update its' live cam the frame AFTER the unload occurs. This isn't an issue with most blends (except for being a frame behind) but it is for cuts.

The attached project demonstrates this. Open PrimaryScene and play. SecondaryScene will be loaded additively and its vcam will take priority. SecondaryScene will be unloaded in 2 seconds and Debug.Break will be called directly after this async call. The CinemachineBrain will still be pointing in the same direction and have no Live camera. Stepping to the next frame will show it updated.
Just to show what is expected, the Loader.cs has a ForceUpdate property that will add a call to CinemachineBrain.ManualUpdate on the sceneUnloaded event. With this property checked the CinemachineBrain behaves as expected. I only used the preview package so I'd have access to CinemachineBrain.ManualUpdate to show this behaviour, the same issue occurs in the verified package.

CinemachineUnloadSceneExample.zip

New Cinemachine icon in the style of the new unity icons

Since the redesign of Unity in 2019 and the update of all icons the cinemachine icon looked always a bit out of place.
So it would be cool if you consider updating it so it fits more in style compared to all other unity icons.

I already designed a idea for it that uses the shape of the regular camera but with a gear icon and the official unity icon color palette for both the light and dark skin.

I made it in Affinity Designer as a vector graphic, so if you like it, I can send you the source file and you are free to use it. 😊

CinemachineCamera

I personally already use it in my projects as I just had to replace the existing icon in the package with my own and imo it looks great in the editor.
2021-06-08_13-43-37_Unity

Cinemachine Timeline Mixer incorrect blend due to incorrect weight calculation

We have been noticing for a while that our CinemachineTrack cameras were performing incorrect blends.

This issue manifests by changing the current "outcoming" camera to the highest priority one in scene even when there is active CinemachineClip if that active CinemachineClip has its weight < 1 (a.k.a. "not complete").
Usually, this happens due to a combination o BlendIn/BlendOut curves and timings on the timeline clips.

We have managed to fix this issue by using a weighted average for the final weight value on the method CinemachineMixer.ProcessFrame, considering CamA and CamB total sum.
If no Cinemachine clips are active we just abort the CameraOverride process, and if there's only one clip active, we consider the transition as finished (force weight value to 1).

I understand that there may be some situations in which it's desirable to use the highest priority virtual camera as a fallback, but that should be optional, probably as an option in CinemachineTrack properties.

We have attached the modified CinemachineMixer file in this post. For now, we will manually add the package with the modified file to our project.
CinemachineMixer.zip

Pattern Matching in the Custom Blends

It would be beneficial to have more flexibility when defining custom blends. Currently we can either use Camera's name or **ANY CAMERA** wildcard. While versitale, it can be easily improved by adding simple pattern matching.
For example instead of having 3 blends for 3 cameras showing opening doors, we can instead suffix all cameras with _CUT and then set a custom blend from **ANY CAMERA** to *_CUT and it will match all 3 cameras.

This should either be done in the package itself or the BlenderSettings should not be sealed to allow for inheritance and customizability of the behaviour.

Rotation of hidden object "cm" involves rotation computing in CinemachineTrackedDolly?

In cinemachine pipeline, cinemachine components are added to hidden objects named "cm". But these objects' local rotations are random by "Create Dolly Camera With Track" or else. When using CinemachineTrackedDolly, if we rotate the parent virtual camera, we get a very weird behavior. I wonder why GetCameraOrientationAtPathPoint uses transform.rotation but not VirtualCamera.transform.rotation?

https://github.com/Unity-Technologies/upm-package-cinemachine/blob/master/Runtime/Components/CinemachineTrackedDolly.cs

Add ECS collisions

When making a project with ECS there are colliders on entitites which are different to normal colliders. Unfortunately it doesnt look like Cinemachine supports interactions with these out of the box. This would be great especially for the CinemachineCollider extension

Since it doesnt look like you can easily override CinemachineCollider I tried to add a custom CinemachineColliderEcs extension instead, but to get it to work I had to copy over the RuntimeUtility into the project since the methods DestroyScratchCollider and GetScratchCollider are internal...
Surprisingly having both the normal CinemachineCollider and my custom CinemachineColliderEcs on the same virtual camera seems to work pretty well, but I think it would be ideal to merge these two so the settings are unified (apart from the tags, which are different for the two physics systems).

I guess I could just try to combine both of them in the same script, but that doesnt feel trivial (dont think my implementation is perfect) and there also seems to be some other functionality that depends on collisions like the Cinemachine3rdPersonFollow extension, so maybe the ECS support needs to be integrated more deeply starting with the RuntimeUtility and use wrappers for the RaycastHit etc to hide the fields for normal/ECS such as Collider/Aabb?

CinemachineColliderEcs.txt

Clarification and Enhancement Request: Cinemachine `PrioritySettings` Casting/Type Conversion Operators

Description

I would like to raise an issue regarding the PrioritySettings struct in the package, specifically its lack of custom operators for casting to/from int, either explicitly or implicitly.
This concern arises from the recent (3.0.0) API changes and the subsequent challenges it poses for developers during the upgrading process.


Issue Details

In the previous API version, setting the camera priority was straightforward, as shown in the following code snippet:

cam.Priority = 1;

However, with the API update, the type has changed while the name remains the same.
Because of that, this change can't be marked with an Obsolete attribute, so it doesn't provide in-IDE guidance for upgrading.

Though they mention it, the comments do not sufficiently clarify the need to set the priority value in my opinion:

The default priority is 0. Often it is sufficient to leave the default setting.
In special cases where you want a CinemachineCamera to have a higher or lower priority than 0,
the value can be set here.

Additionally, this issue is not addressed in the Cinemachine Upgrade Guide, leading to potential confusion among users, especially beginners. They might incorrectly assume the new assignment method as:

cam.Priority = new PrioritySettings();

or

cam.Priority = new PrioritySettings(){ Value = 1 };

Instead of the correct approach:

cam.Priority.Value = 1;

Suggested Enhancements

A. Adding Custom Operators: Implement custom operators for casting to/from int in the PrioritySettings struct. This would streamline the process and make it more intuitive, particularly given that the struct primarily serves as a wrapper around an integer.

B. Documentation Update: Revise the XML comments and the Upgrade Guide to clearly explain the new method of setting priority. This would help in reducing confusion and aid in smoother transitions for developers upgrading their projects.


Conclusion

The lack of custom operators and clear documentation for the PrioritySettings struct in the Cinemachine package poses unnecessary challenges in the upgrading process.
Implementing (one of) these suggested enhancements would significantly improve the developer experience and reduce potential roadblocks.

FindAllBehavioursInScene throws an exception if it finds a behavior without an associated gameobject

When I exit play mode with "Save Play Mode Changes" box checked, I get an exception.

NullReferenceException: Object reference not set to an instance of an object
SaveDuringPlay.ObjectTreeUtil.FindAllBehavioursInScene[T] () (at Library/PackageCache/[email protected]/Editor/Utility/SaveDuringPlay.cs:78)
SaveDuringPlay.SaveDuringPlay.FindInterestingObjects () (at Library/PackageCache/[email protected]/Editor/Utility/SaveDuringPlay.cs:476)
SaveDuringPlay.SaveDuringPlay.SaveAllInterestingStates () (at Library/PackageCache/[email protected]/Editor/Utility/SaveDuringPlay.cs:502)
SaveDuringPlay.SaveDuringPlay.OnPlayStateChanged (UnityEditor.PlayModeStateChange pmsc) (at Library/PackageCache/[email protected]/Editor/Utility/SaveDuringPlay.cs:431)
UnityEditor.EditorApplication.Internal_PlayModeStateChanged (UnityEditor.PlayModeStateChange state) (at <90d4bcb003fb405fb09241aed2f178aa>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

This happens on both 2.5.0 stable and 2.6.0 preview.

I've tracked the MonoBehaviour it's finding down to a helper script I have that animates textures on an imported model via animation events. This script actually isn't even being used any more (no animation event refers to it), but I never removed the script from the gameobject.

The gameobject it's attached to is an imported FBX (so it acts kinda like a prefab but it's not a real prefab). I'm guessing that probably has something to do with it.

The script in question is this:

using UnityEngine;

[ExecuteInEditMode]
public class SetTextureHelper : MonoBehaviour
{
    public Material Material;
    public Texture2D[] Textures;
    
    // This will be called when the animator first transitions to this state.
    public void SetMainTex(int textureIndex)
    {
        if (Textures.Length == 0 || textureIndex > Textures.Length - 1)
        {
            Debug.LogWarning($"Can't set MainTex to index {textureIndex}. Textures is only {Textures?.Length ?? -1} long");
            return;
        }
        Material.SetTexture("_MainTex", Textures[textureIndex]);
    }
}  

Attach it to an imported model, then enter an exit play mode with the "save on exit play mode" option checked. It should throw this exception.

Support New InputSystem

Now the new InputSystem is out of Preview, perhaps Cinemachine can be upgraded to support it? Currently, with only the new Input System active in a project, Cinemachine throws exceptions when using a Freelook Camera.

Need On Camera Live End Event

This event fires when a Virtual Camera goes live. If a blend is involved, then the event fires on the last frame of the blend.

Feature Request: Add OnBlendComplete / OnCameraTransitionComplete event to Cinemachine Brain

Currently we have no simple way to be notified when a Cinemachine camera has been fully transitioned to. I propose a OnBlendComplete / OnCameraTransition event be added to the Cinemachine brain component in order to allow developers to easily integrate game behavior when a camera is fully transitioned / blended to.

After thinking about it a bit, one decent way of integrating this behavior would be something like the following.

OnCameraTransitionComplete(ICinemachineCamera fromCamera, ICinemachineCamera toCamera, CinemachineVirtualCameraBase managerInvokingBlend = null)

While I admit the above could use some work, it at least covers all the information I think that should be sent along with the event. To elaborate a bit more on the last parameter, that would just be the reference of whichever manager camera the user might be using that invoked the blend.

Below are some additional links to places on the forum where people have discussed this functionality.

Thanks in advance!

Feature request: Looping blend list

Either with an OnComplete event (which could be handy anyway), and a way to restart the list, or simply exposing some variables or making them protected so I could derive from the class and add functionality. Maybe even a ping pong or reverse.

CinemachineConfiner2D is literally cutting corners

So the way this seems to work is that the client of Cinemachine providers a bounding shape of the world (in this case a polygon) in which the camera bounds should be confined, we call this "outer polygon". Cinemachine then produces a smaller polygon, we call this the "inner polygon", which defines the shape that should confine the center of the camera. For the sake of reasoning we can also imagine two points, the "outer point" which is the camera target, typically the player, and the "inner point" which is the center of the camera. The inner point wants to be as close to the other point as possible at any given time, but limited to the shape of the inner polygon. This makes a lot of sense and is a good approach to the problem as it is quite easy to figure out if a point is inside a poly and if not what is the closest point of the poly where that is the case.

However, there are some issues atm. Wherever there is a concave corner in the outer polygon, there is obviously also a concave corner in the inner polygon. Between these corners is a line. If we imagine that this line continues from the outer corner through the inner corner and beyond it will cut the inner polygon into two pieces (potentially more but that's irrelevant to the case at hand).

The thing about this line is that whenever the outer point passes it outside the inner poly - which of the two parts of the inner poly is the best fit for the inner point changes. I.e. there is a point in the other inner shape that is closer to the outer point than the part the inner point was previously in. So the camera should move there. Cinemachine does this, so far so good.

The problem is that the current implementation in CinemachineConfiner2D does this by simply cutting the corner. Either by snapping there if damping is 0, or slowly interpolating its position there displaying parts of the world which was clearly defined as undesirable by the initial outer polygon specified by the client. None of the solutions are sufficient to make up a good user experience.

Instead Cinemachine should move the inner point to the new desired inner point by gradually walking it there using the shortest possible path within the inner polygon. Just the way an actual camera man would have to do it. It should be possible to specify:

  • The maximum velocity at which this is performed.

  • Perhaps some inertia which makes the corner-to-corner line a bit fuzzy making it less eager to actually start walking. Otherwise it will walk back and forth if the outer point passes the line multiple times rapidly. The camera man is lazy.

  • Perhaps some easing factor to provide less linear movement.

I'm pretty sure this could be improved even further by some smart look a head when the outer point is close to the line. I.e. the amount of "walking" that is performed by the inner point is relative to the distance between the line and the outer point. It's like the camera man anticipates the need to move to the other side.

Anyway I hope you acknowledge this issue and that my reasoning may help improving Cinemachine which I in general find really useful!

The Search Radius Property of Tracked Dolly Component NOT behaviour as expected

cinmemachine version is 2.6.2

In the class CinemachinePathBase FindClosestPoint function, if not looped, the end value will always equal MaxPos. I think this needs to be changed to end = Mathf.Min(end, MaxPos); otherwise the closest position will search from start to MaxPos

       public virtual float FindClosestPoint(
            Vector3 p, int startSegment, int searchRadius, int stepsPerSegment)
        {
            float start = MinPos;
            float end = MaxPos;
            if (searchRadius >= 0)
            {
                int r = Mathf.FloorToInt(Mathf.Min(searchRadius, (end - start) / 2f));
                start = startSegment - r;
                end = startSegment + r + 1;
                if (!Looped)
                {
                    start = Mathf.Max(start, MinPos);
                    end = Mathf.Max(end, MaxPos);//here should be end = Mathf.Min(end, MaxPos)?
                }
            }

Game Window Guides when Rendering to a texture

Hi,

I have realized that the cinemachine would not draw the game window guides if the camera is rendering to a texture. I have tried bypassing this by removing the check:
(brain.OutputCamera.activeTexture != null && CinemachineCore.Instance.BrainCount > 1) from the following statement in CinemachineComposerEditor.cs:

// Don't draw the guides if rendering to texture
            CinemachineBrain brain = CinemachineCore.Instance.FindPotentialTargetBrain(vcam);
            if (brain == null || (brain.OutputCamera.activeTexture != null && CinemachineCore.Instance.BrainCount > 1))
                return;

by removing this check, I hoped that the Cinemachine would draw the guides, but it still doesn't. Am I missing something?

Cinemachine Culling Mask

Hello ,Can Cinemachine Virtual Camera have their own Culling Mask ?

I hope When switch cinemachineVirtualCamen the Culiing mask dynamic change ,just like

CinemachineStoryboard fade in .

emmm, I have a A virtualcamera ,Culling Mask Layer is green Skybox and Model1,And I have a B

virtualCamera,Culling Mask Layer is blue Skybox And Model2, I hope When I switch

virtualCamera have Fade Effect . What Can I do ? Thank you .

Is the bugfix #74 exactly correct?

I have 3 States and StateDrivenCamera does not switch cameras since GetClipHash(info.fullPathHash, m_clipInfoList); returns the wrong hash.
If I roll back the changes in the ChooseCurrentCamera() function from bugfix #74 , everything works fine thanks to hash = info.fullPathHash;

FreeLook Cam Issue

Free Look cam is not working by default. I did have assigned follow and look at target. After pressing play button, main camera does not do anything and also every time I select free look cam gameobject (btw this gameobject is prefab) I get the error I pasted at the bottom. But if you disable and re-enable free look gameobject at runtime it starts to work like normal.

Produced In Unity Version: 2021.2.11f1

Error In Editor:
NullReferenceException: Object reference not set to an instance of an object
Cinemachine.CinemachineFreeLookEditor.DrawFreeLookGizmos (Cinemachine.CinemachineFreeLook vcam, UnityEditor.GizmoType selectionType) (at Library/PackageCache/[email protected]/Editor/Editors/CinemachineFreeLookEditor.cs:178)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

CinemachineFreeLookCam

CinemachineFreeLookCam

Hello ,CinemachineFreeLook Custom Orbits (Top Rig,Middle Rig, BottomRig) By Bézier curve ,No Circle Path .

CinemachineDollyCart doesn't work in Edit mode

I try to use CinemachineDollyCart with CinemachineSmoothPath and it works in Play mode, but it can't show Preview in Edit mode / Timeline tab.

Is it possible to Preview cutscenes when using CinemachineDollyCart?

Can't remove Physics package with Cinemachine installed

I'm attempting to clear my Unity project of unneeded native modules. As the project is entirely 2D on the gameplay side, as well as the camera side incidentally, I figured I wouldn't need the Physics package because Physics2D has everything I need.

Unfortunately, when I try to remove it, I get compiler errors from CinemachineCollider.cs, CinemachineOrbitalTransposer.cs, CinemachineTriggerAction.cs, and CinemachineImpulseSource.cs--it seems those files all contain references to components from the Physics module (Collider, Collision, RaycastHit, Rigidbody, etc.). The camera in this project is meant to follow the player in a 2D fashion, so I likely don't need Cinemachine Collider or Orbital Transposer, was wondering: is it possible to have these modules be excluded if the Physics module is not present?

And if so, is it a bad idea? Because I'd hate to be one to say "I don't need this, therefore nobody whose circumstances resemble mine is going to need this."

`SaveDuringPlay` script does not work outside of the package

The SaveDuringPlay script documentation notes that we can

To use this class, drop this script into your project, and add the [SaveDuringPlay] attribute to your class.

However, the class does not inherit from Attribute so it cannot be added as an attribute.

Feature request for framingTransposer: Set position

It would be nice to have a function, called "SetPosition" or something like that. That function should set the camera's position, and clear damping values.

I found a way to move the camera through OnTargetObjectWarped, but had to look for that function for a day, as it's not really clear how that could be used.

Redudant repainting: Laggy Editor with "Solo" camera

On 2021.3.2f1 I experience some heavy editor lags when I set a vcam to solo.

I did some profiling and figured out RepaintAllViews is triggered at least 4 times per frame, each time fully redrawing the whole Unity Editor. 💣

With Event.current.type being 2x Layout, 2x repaint if there is one Inspector window visible. For every additional visible Inspector it's one more Layout call per frame. It gets called even more often due to e.g. mouse events.

Cinemachine's FreeLook and New Input System interact incorrectly.

I wanted to implement a third person camera using FreeLook.

But, when the update mode is in FixedUpdate mode, mouse input is slow, when in LateUpdate mode, gamepad input is fast.

Perhaps it was discovered because we implemented the character's movement using a Rigidbody and root motion in the target transform.

Luckily, I forked and fixed the CinemachineInputProvider that came with the latest version of Cinemachine and the problem went away.

It's a very weird and inefficient way, but here's the code:

        public virtual float GetAxisValue(int axis)
        {
            var action = ResolveForPlayer(axis, axis == 2 ? ZAxis : XYAxis);

            var deltaCorrection = 1f;

            if (action.controls[0].device is Mouse)
            {
                // Check FixedUpdate
                if (deltaTime != Time.deltaTime)
                {
                    deltaCorrection = Time.fixedDeltaTime / deltaTime; // my project's fixedDeltaTime is 0.016.
                }
            }
            else if (action.controls[0].device is Gamepad)
            {
                // Check LateUpdate
                if (deltaTime == Time.deltaTime)
                {
                    deltaCorrection = deltaTime / 0.016f;
                }
            }
            if (action != null)
            {
                switch (axis)
                {
                    case 0: return action.ReadValue<Vector2>().x * deltaCorrection;
                    case 1: return action.ReadValue<Vector2>().y * deltaCorrection;
                    case 2: return action.ReadValue<float>() * deltaCorrection;
                }
            }
            return 0;
        }

The Unity version in use is 2019.4.12f.

CM3 not in 2022.3.11f1

Hey all.
I cannot find CM 3.0 pre-release version in my projects package manager. I can see up to 2.9.7
I'm running 2022.3.11f1 and have pre-release packages enabled in my project settings.
I see in the docs that minimum editor version is 20222.2.16f1
Hopefully this is a typo and i meet the minimum editor requirement because i would hate to have to wait 18k years to get my hands on the new version :P

Any ideas why i cannot find v3 in package manager? Should it be as simple as having minimum version and enabling experimental packages or am i missing something here?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.