Bug with blending and quick switches

Title may sound like a next Harry Potter book name, but I faced next problem.

I have two cameras, it takes two seconds to blend from one to another.

But, if I start blending, wait for blending to be like 90% and then switch back and switch forward again, last 10% percent of the blending will take two seconds again.

It’s easier to explain on scheme:

Maybe it’s not a bug and this behavior is intended, but… I don’t know, it’s little weird, is you ask me.

1 Like

I wrote some tests for blending

First one checks blending is working. [PASS]
Second one checks that blending with short interruption takes the same time as clear [FAILED]
Third one checks that interrupted blending takes more time [PASS]

7168876--858823--upload_2021-5-24_1-13-23.png

I get the same results on 2.7.3, 2.8.0-exp.2 and with fixed CameraState.

I see some comments on source code, saying that it should handle such case

/// <summary>Create a blend between 2 virtual cameras, taking into account
/// any existing active blend, with special case handling if the new blend is
/// effectively an undo of the current blend</summary>

7168876–858820–CamerasBlendingTests.cs (3.32 KB)

1 Like

Thanks for reporting the bug and the tests! We are going to fix it :wink:

1 Like

Hey! Thanks for quick response! I think that problem is in Brain, when it handles “special case”. I tried to fix it by myself, but I don’t understand the flow and wasn’t succeed.

if somehow solution is obvious for you, could you please provide me with instructions for fixing it? Or with fixed file, just like with CameraState before.