Check if Camera is transitioning?

Is there a way to check if a camera is currently transitioning between view targets via the Set View Target with Blend node?

Edit: more specifically, I’m transitioning between cameras using Set View Target with Blend, and unchecking Lock Outgoing makes the transition very smooth, unless the camera is currently transitioning, in which case it just snaps to the next camera, which looks terrible.

I don’t fully understand what you’re trying to do.

Why do you need to validate the execution of the node/function if you can see it happening?

If you transition between two cameras using that node and Lock Output is set to 0, you’ll get a smoother transition, but if you transition into a third camera while the first transition is occurring, the camera will jump to the final camera, which is bad.

Checking Lock Output will solve this, but it will also make the transition less smooth because it nullifies any existing movement in the camera. So I’m trying to set it up so that Lock Output is set to 0 unless the camera is transitioning, in which case it will set itself to 1 as a last resort to avoid any jumps.

AHHHHHHH

Much clearer.

The quickest thing I can think of is to set a timer that is governed by the float value of the BLEND TIME.

The Lock Output can only be adjusted once that timer has passed.

1 Like

Haven’t tried this - but theoretically…

You could also use the GetViewTarget node from the PlayerController.

Save the NewViewTarget value in a variable right before you call SetViewTargetWithBlend. Then check if NewViewTarget == GetViewTarget. GetViewTarget will only give the NewViewTarget once the blend finishes.

Not a beautiful solution, but I looked in the C++ and that’s about the best you could get in a Blueprint. :slight_smile:

1 Like

^^^ That was a nice thought, but it doesn’t work. GetViewTarget will return the PendingViewTarget as per the APlayerCameraManager::GetViewTarget implementation, so GetViewTarget will equal the NewViewTarget immediately.
It would be in easy thing to do with C++, but indeed you may just want to set a timer for BP.

1 Like

I use the setviewtargetwithblend feature heavily in my camera system without lockoutgoing. I use a simple state machine (switch-case) that performs a distance check between the playercameramanager transform and new viewtarget transform to determine if transition ongoing or completed to mimic a latent function.

1 Like