Prevent camera flippin on characters switch in 3D fighting game

Hello,
Im working on a 3d fighting game. I have a separate BP for the camera :

  • of which springarm location is between the 2 characters. It works.
  • Camera zoom is ok too

Problem is rotation :
When the fighters are at a distance, I want to be able to turn around the opponent. The camera is at 90° as in any game. And it works very well with the BP (Cf. image).

Now I want to make sure that during a projection or if one jumps over the other, the camera is no longer at 90° from their position but at -90°. (like Tekken or Dead or Alive)

Start position or when turning around each other :
Player 1 (left) - Player2 (right), Cam +90°

On quick switch :
(left) Player 2 - Player 1 (right), Cam -90°

I already know how to switch inputs after that, but here I don’t know how and which condition to test.

Please, help me. Thanks in advance

Hi JDS7256

You could just clamp the value going in the rotation to prevent any value from exceeding the desired rotation limits.

Thanks

Alex

Hi, nope.
As explained if it’s not a quick change, they can make several whole turns without problem.
I think it’s more about an angular acceleration of cam yaw or whatever…