Hi everyone !
I just started working on a smash-like platform fighting game and I have a bit of a problem with how the camera works. I worked on Unity before and just recently made the switch to Unreal as I knew next to nothing about it.
In Smash, the camera seems to focus on the center point between two characters and zoom in if they’re close to each other or out they get farther away.
I managed to implement this system (to an extent) :
(I’m currently using 1 player and a placeholder skeletal mesh as a second one)
When I print the CurrentDistAlpha, I see that it’s zooming in and out as long as it stays in the 0-1 range of the clamp (for reference, T-posing mesh is at about 0.8)…
However as soon as I cross the T posing mesh and go out of the 0-1 range, it obviously doesn’t zoom out.
So my question is : how should I do to make it zoom out again once the characters have passed each other ?
My guess is with a distance comparison using the “Vector (Distance)” or “Get Distance To” nodes but I have no idea how to use their values to influence the CurrDistAlpha of my Lerp.
Could anyone help me ?