dead zone function not working in timeline

I am using Unity 2017.3 and the dead zone function of the cinemachine virtual camera is only working in “Play” mode and not in the timeline scrubber.
So when playing from the timeline, even if the Aim object is in the dead zone of the camera, the camera still moves when it shouldn’t.

I

Yes that’s true. It’s a limitation of Timeline. If you hit the little “play” button in timeline, then it will work correctly outside of game Play mode, but just scrubbing will put the cameras at their “start” positions and not take damping or other dynamic stuff into account.

I see, but even when I hit the play button it still doesn’t work.

It works on the cameras that are invoked from the timeline. If you don’t have a timeline CM clip active under the scrub head and CM is reverting the the normal (outside-of-timeline) game vcam, then that vcam will always be at its “start” position, which is in the center of the dead zone. You have to enter Play Mode to test.

But I do have a timeline CM clip in the timeline.

Well, it’s working for me. Maybe you could put together a little demo package that shows the problem?

Hey Gregory,
Here you go, notice how the camera behavior is different in gameplay and in timeline.

3375807–264799–cm_timeline_issue.unitypackage (94.3 KB)

And here you can see a video of another situation where the virtual camera behaves differently in the timeline compared to playmode:
https://drive.google.com/file/d/1M9cK4AhFP6KSSUX1KbZ0oMMN6cL0_oDk/view?usp=sharing

I see the problem. You have an animation track on the vcam, not a CM Shot clip. It’s the shot clips that activate the cameras. It’s like “use this camera now”.
Drag the Unity Camera (the one with the CM brain) onto the timeline to create a Cinemachine Track for it. Then right-click on the track, create a Cinemachine Shot Clip. In the shot clip inspector, set the vcam. Then it will work.

Ok I will try that but is it possible to pally this for the current virtual camera (spent some time keyframing it and adjusting its values)? Or will I have to do all from scratch?

I tried what you suggested but I still have the same issue:

Hi @flapyfox ,

  • You can have 2 CM tracks running at the same time: one CM Shot clip to activate the vcam, and a second Animation track to animate its settings. So you just have to add the CM shot to your existing timeline, without redoing anything.
  • I don’t see the issue in your latest video. The camera looks like it’s damping.
  • I imported your project and ran it. It works perfectly, dead zone is respected when scrubbing or playing timeline: https://www.screencast.com/t/AIzjkKK8

Hey Gregory,
2- actually this video is not focusing on the dead zone problem, it illustrates another issue where the camera animation in the timeline is different than the camera animation in playmode making it impossible to work with cinemachine. Notice when I hit “play” in the game window how the camera starts at a different place.

3-regarding the dead zone issue, here is another video that shows the issue:
Notice how in the first part, all seems correct, camera doesn’t move unless the target exits the dead zone.
Notice how in the second part, the camera starts moving straightway even if the target is still in the dead zone.

It’s because you haven’t bound the Cinemachine track to anything. As a result, it’s doing nothing. Drag the Unity Camera (the one with the CM brain) and drop it on the indicated spot.
3376815--264904--upload_2018-2-1_11-24-55.png

Ok it was my bad then, so dead zone issue fixed.
What about the difference between the timeline and playmode animation? notice in this video how the animation is different and how the camera jumps into a new position when I hit “play” in the gameplay window:

Right. It probably has to do with the current state of affairs when timeline starts playing. It’s different in Edit mode and Play mode, because Play mode starts from nothing, and Edit mode depends on what you were doing when you started playing the timeline. The vcams just carry on from where they are on any given frame. You need to ensure a reproducible start point.

Try this:
Create another vcam to serve as the “default” vcam, that is active when timeline isn’t activating a vcam. Give it a higher priority. Disable the first vcam activated by timeline (timeline will force-enable it during the clip). I think that will force Edit and Play mode to have the same initial conditions.

Ok the hack worked , but I had to create a a new vcam and disable both vcams but since it’s disabled I cant work with it and animate it anymore. Is there another solution?

What I need is very simple, I want to have a vcam with an aim target (a sphere that I will animate) and I want to be able to animate the camera position at the same time. Is it something I can do with cinemachine because once I have a cinemachine shot clip in the timeline it overrides the animation track of the same vcam.

Save the target in the scene at the same spot where it starts in your animation

I did this (by copying the sphere’s transforms from the timeline’s first frame), and now the vcam starts at the same position in both timeline and playmode.
But the animation seems to be different, it seems smoother in the timeline and a bit jerky in the gameplay (its’subtle but I am rendering 4k cienmatic animations so it’s still a problem) notice the subtle camera jump in the beginning of the second animation at 0:18, that doesn’t happen in the timeline animation where it’s smooth :

Kinda hard to see in the video…
I’m guessing that this has to do with the fact that Unity does not give you a constant frame rate in the editor. Am I to understand that this project is a rendered movie? If so, when you use the Recorder asset to record the movie, you can set it to render at a constant framerate.