# Prevent camera flippin on characters switch in 3D fighting game

**URL:** <https://forums.unrealengine.com/t/prevent-camera-flippin-on-characters-switch-in-3d-fighting-game/475800>\
**Category:** Character & Animation\
**Tags:** fighting-game, unreal-engine, question\
**Created:** [December 12, 2020, 2:07pm UTC](https://forums.unrealengine.com/t/prevent-camera-flippin-on-characters-switch-in-3d-fighting-game/475800 "2020-12-12T14:07:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JDS7256](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JDS7256](https://forums.unrealengine.com/u/JDS7256)\
**Post date:** [December 12, 2020, 2:07pm UTC](https://forums.unrealengine.com/t/prevent-camera-flippin-on-characters-switch-in-3d-fighting-game/475800/1 "2020-12-12T14:07:21Z")

</div>

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).

 ![324594-bp-camera-rotation.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/0/d/10d156450aa3c311b4dc797950fbd224c16f8c9c.png)

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

---

<div class="post-metadata">

**Author:** ![Alekann01](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alekann01](https://forums.unrealengine.com/u/Alekann01)\
**Post date:** [December 12, 2020, 6:04pm UTC](https://forums.unrealengine.com/t/prevent-camera-flippin-on-characters-switch-in-3d-fighting-game/475800/2 "2020-12-12T18:04:44Z")

</div>

Hi JDS7256

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

Thanks

Alex

---

<div class="post-metadata">

**Author:** ![JDS7256](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JDS7256](https://forums.unrealengine.com/u/JDS7256)\
**Post date:** [December 13, 2020, 8:24am UTC](https://forums.unrealengine.com/t/prevent-camera-flippin-on-characters-switch-in-3d-fighting-game/475800/3 "2020-12-13T08:24:33Z")

</div>

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…
