# Press key again to zoom out

**URL:** <https://forums.unrealengine.com/t/press-key-again-to-zoom-out/362132>\
**Category:** Blueprint\
**Tags:** unreal-engine, UE4, Blueprint, question\
**Created:** [June 27, 2016, 10:18am UTC](https://forums.unrealengine.com/t/press-key-again-to-zoom-out/362132 "2016-06-27T10:18:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sntfon100](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sntfon100](https://forums.unrealengine.com/u/Sntfon100)\
**Post date:** [June 27, 2016, 10:18am UTC](https://forums.unrealengine.com/t/press-key-again-to-zoom-out/362132/1 "2016-06-27T10:18:03Z")

</div>

When I press right mouse button my camera zooms my gun, so when I press it again I want it to zoom out instead of holding right mouse button to zoom in and out. I tried looking for an answer but couldn’t find any.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_0df12f74](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0df12f74](https://forums.unrealengine.com/u/anonymous_user_0df12f74)\
**Post date:** [June 27, 2016, 2:39pm UTC](https://forums.unrealengine.com/t/press-key-again-to-zoom-out/362132/2 "2016-06-27T14:39:53Z")

</div>

To do this you should use a “FlipFlop” node connected to the “Pressed” right mouse button zoom event.

Not sure how you have it set up in blueprints currently, but you will want to connect the Zoom In nodes to the “A” output, then the Zoom Out nodes to the “B” output.

With that in place pressing the right mouse button once will zoom in and stay that way until you right click again. A flip flop does exactly what it’s name suggests, alternates between two outputs when triggered.

Hope that helps!

---

<div class="post-metadata">

**Author:** ![Sntfon100](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sntfon100](https://forums.unrealengine.com/u/Sntfon100)\
**Post date:** [June 27, 2016, 7:18pm UTC](https://forums.unrealengine.com/t/press-key-again-to-zoom-out/362132/3 "2016-06-27T19:18:03Z")

</div>

Ohh so that was that easy xD , Thanks for the answer and for explaining it to me!
