# Swipes

**URL:** <https://forums.unrealengine.com/t/swipes/887>\
**Category:** Mobile\
**Tags:** unreal-engine, iOS\
**Created:** [March 25, 2014, 8:20am UTC](https://forums.unrealengine.com/t/swipes/887 "2014-03-25T08:20:27Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![GregPenn](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/gregpenn/32/963417_2.png) [@GregPenn](https://forums.unrealengine.com/u/GregPenn)\
**Post date:** [March 25, 2014, 8:20am UTC](https://forums.unrealengine.com/t/swipes/887/1 "2014-03-25T08:20:27Z")

</div>

Hi folks,

Is there any plan to add in some of the input functions like Swipes from UDK to UE4?

I’m going to tinker with Blueprint but if there is a plan to port over more functions that’d be awesome.

All the best

Greg

---

<div class="post-metadata">

**Author:** ![Midnight\_Toil](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Midnight\_Toil](https://forums.unrealengine.com/u/Midnight_Toil)\
**Post date:** [March 29, 2014, 8:49am UTC](https://forums.unrealengine.com/t/swipes/887/2 "2014-03-29T08:49:08Z")

</div>

Swipes are not built in yet, but you can add support in a Blueprint. Here is how I just set it up.

---

<div class="post-metadata">

**Author:** ![Meathead](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Meathead](https://forums.unrealengine.com/u/Meathead)\
**Post date:** [March 29, 2014, 8:55am UTC](https://forums.unrealengine.com/t/swipes/887/3 "2014-03-29T08:55:09Z")

</div>

Thank you for that we have also been trying to create a swipe in our games.

---

<div class="post-metadata">

**Author:** ![GregPenn](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/gregpenn/32/963417_2.png) [@GregPenn](https://forums.unrealengine.com/u/GregPenn)\
**Post date:** [March 29, 2014, 10:51am UTC](https://forums.unrealengine.com/t/swipes/887/4 "2014-03-29T10:51:06Z")

</div>

> [@;8406](#):
>
> Swipes are not built in yet, but you can add support in a Blueprint. Here is how I just set it up.

Thats brilliant much better than my attempt, i originally uscripted this for my last project so its really nice to see it in Blueprint.

All the best

Greg

---

<div class="post-metadata">

**Author:** ![Cefas](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/cefas/32/917212_2.png) [@Cefas](https://forums.unrealengine.com/u/Cefas)\
**Post date:** [April 8, 2014, 10:09pm UTC](https://forums.unrealengine.com/t/swipes/887/5 "2014-04-08T22:09:48Z")

</div>

Thanks!!! Greate swipe implementation.

Hi, I have done this; post this: (Unreal Engine Developer) Swipes are not built in yet, but you can add support in a Blueprint. Here is how I just set it up.

 ![SwipeSupportBig.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/3/1/31a78363c2a219cda484c437aeb42b42b718c318.jpeg)&d=1396083248

but is only registering the down swipe everywhere I move the mouse or touch input.

---

<div class="post-metadata">

**Author:** ![Midnight\_Toil](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Midnight\_Toil](https://forums.unrealengine.com/u/Midnight_Toil)\
**Post date:** [April 14, 2014, 9:55pm UTC](https://forums.unrealengine.com/t/swipes/887/6 "2014-04-14T21:55:07Z")

</div>

> [@Roy;14572](#):
>
> Thanks!!! Greate swipe implementation.
> 
> but is only registering the down swipe everywhere I move the mouse or touch input.

I’m not exactly sure what you mean, but if you recreated what I did in the shot, it works correctly, I’m using it now.

---

<div class="post-metadata">

**Author:** ![Cefas](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/cefas/32/917212_2.png) [@Cefas](https://forums.unrealengine.com/u/Cefas)\
**Post date:** [April 23, 2014, 8:02pm UTC](https://forums.unrealengine.com/t/swipes/887/7 "2014-04-23T20:02:51Z")

</div>

I have find the bug, it was a wrong variable.  
😕 sorry for the time and Thanks!!!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_c6d9ab0b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_c6d9ab0b](https://forums.unrealengine.com/u/anonymous_user_c6d9ab0b)\
**Post date:** [April 26, 2014, 5:46pm UTC](https://forums.unrealengine.com/t/swipes/887/8 "2014-04-26T17:46:01Z")

</div>

Thanks! can somebody scribble over this explaining what each part does? I’m pretty new to visual scripting and would appreciate the lesson 🙂 and I’m sure others would too!

---

<div class="post-metadata">

**Author:** ![Midnight\_Toil](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Midnight\_Toil](https://forums.unrealengine.com/u/Midnight_Toil)\
**Post date:** [May 11, 2014, 12:15am UTC](https://forums.unrealengine.com/t/swipes/887/9 "2014-05-11T00:15:35Z")

</div>

> [@Kiyan;23624](#):
>
> Thanks! can somebody scribble over this explaining what each part does? I’m pretty new to visual scripting and would appreciate the lesson 🙂 and I’m sure others would too!

Ok Kiyan, I made a new version with more info, how is this?

FYI, I had them raise the image size limitation on images posted to the forums. You can now post images up to 65kx65k resolution, and 5 megs in size.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_d1044d24](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d1044d24](https://forums.unrealengine.com/u/anonymous_user_d1044d24)\
**Post date:** [June 20, 2014, 3:24pm UTC](https://forums.unrealengine.com/t/swipes/887/10 "2014-06-20T15:24:35Z")

</div>

> [@;37879](#):
>
> Ok Kiyan, I made a new version with more info, how is this?
> 
> FYI, I had them raise the image size limitation on images posted to the forums. You can now post images up to 65kx65k resolution, and 5 megs in size.

Thanks , Is there a way to check for a 2 finger swipe? I want to pan my camera(top-down/rts view) using 2 fingers…

---

<div class="post-metadata">

**Author:** ![AgentGhost](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AgentGhost](https://forums.unrealengine.com/u/AgentGhost)\
**Post date:** [July 23, 2014, 12:21pm UTC](https://forums.unrealengine.com/t/swipes/887/11 "2014-07-23T12:21:27Z")

</div>

Hi Thanks for the post. I have some doubts because i’m a newbie to blueprint 😛

1. What is “TouchStart2dVector”? is it a variable? Then What is the type?  
2.At the end after SET is the nodes going to a finish Execute? If not where is it going?  
3.This is not regarding swipe its about pinch…  
I want my actor to move forward when i pinch on the screen. I almost got that by assigning it on the input the actor keeps moving after pinch I want it to stay until i pinch again. Can anyone help me on this Please  
Thanks 😛

---

<div class="post-metadata">

**Author:** ![Midnight\_Toil](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Midnight\_Toil](https://forums.unrealengine.com/u/Midnight_Toil)\
**Post date:** [August 8, 2014, 10:03pm UTC](https://forums.unrealengine.com/t/swipes/887/12 "2014-08-08T22:03:01Z")

</div>

Hi AgentGhost, Yes, TouchStart2DVector and TouchEnd2DVector are both variables of the type Vector2D under Struct.  
Yes, after Set, the flow will continue on to whatever you want.  
As for only moving while pinching, you should have a variable that is only true when you are pinching. Then, use this variable to determine whether you guy should move or stand still.

---

<div class="post-metadata">

**Author:** ![Denis](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Denis](https://forums.unrealengine.com/u/Denis)\
**Post date:** [September 3, 2014, 3:47pm UTC](https://forums.unrealengine.com/t/swipes/887/13 "2014-09-03T15:47:41Z")

</div>

Hi !  
First of all thanks for what you did in BP ! It’s awesome 🙂  
I still have probleme reading this image :  
I would like to know of which type of variable is the swap direction so you can set right left etc and to what is are they connected after that? To an “add controller pitch & yaw input” ?

Thanks in advance !

Denis

---

<div class="post-metadata">

**Author:** ![gamedev1000](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@gamedev1000](https://forums.unrealengine.com/u/gamedev1000)\
**Post date:** [October 16, 2014, 3:09pm UTC](https://forums.unrealengine.com/t/swipes/887/14 "2014-10-16T15:09:53Z")

</div>

I’m also new to UE and have a couple of follow up questions:

- How can I set the swipe direction to left, right, up, down (as you have at the end of your blueprint example)? Is it something that needs to be mapped in Project Settings - Input, and how exactly do you do that?

- How do you use the mouse to test the swiping motion? (Is there anything beyond checking ‘Use Mouse for Touch’ in the Input settings?)

Thanks!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_f420efeb](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f420efeb](https://forums.unrealengine.com/u/anonymous_user_f420efeb)\
**Post date:** [October 17, 2014, 10:21pm UTC](https://forums.unrealengine.com/t/swipes/887/15 "2014-10-17T22:21:43Z")

</div>

I was also struggling with this and finally figured out a fairly nice method. I still have to work easing in, but I thought I would share it with everyone. It involves 2 blueprints: one for swipe controller and one for the ground. In the swipe controller there is also a custom function added. This allows swipe to look tap to move. It seems to work well on android, I didn’t test on ios yet.

 ![swipecontroller_blueprint_eventgraph.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/6/d/6d27b4c6aadd4e83f6c5787bbb01bf65527df0ed.jpeg) ![swipecontroller_blueprint_eventgraph_closeup1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/1/f/1f992a760b8f547102f4ff939b18fa079b778b34.jpeg) ![swipecontroller_blueprint_eventgraph_closeup2.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/5/4/54d642f7101411f4fe785e8d84da2b9a22568a9b.jpeg) ![swipecontroller_blueprint_movehitlocation_function.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/5/e/5e78ae7d10f247b50e984addac9c3a12419aea21.jpeg)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_7947aa6d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_7947aa6d](https://forums.unrealengine.com/u/anonymous_user_7947aa6d)\
**Post date:** [December 5, 2014, 5:47pm UTC](https://forums.unrealengine.com/t/swipes/887/16 "2014-12-05T17:47:55Z")

</div>

> [@;165522](#):
>
> I was also struggling with this and finally figured out a fairly nice method. I still have to work easing in, but I thought I would share it with everyone. It involves 2 blueprints: one for swipe controller and one for the ground. In the swipe controller there is also a custom function added. This allows swipe to look tap to move. It seems to work well on android, I didn’t test on ios yet.

This was exactly what I needed! Thanks !  
I noticed one small problem though: The node that inverts x-axis (_X_ \* -1) causes the view to jump sometimes. I simply moved it like so:

 ![invertlook.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/1/5/a15bbef9b787e5eb5fc9005155801281ac451ef5.png)

(Note that I also added a clamp angle node)

---

<div class="post-metadata">

**Author:** ![Pewbot](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pewbot](https://forums.unrealengine.com/u/Pewbot)\
**Post date:** [April 12, 2015, 11:58pm UTC](https://forums.unrealengine.com/t/swipes/887/17 "2015-04-12T23:58:33Z")

</div>

I know this is an old thread but is there any update on adding swipe features yet?

---

<div class="post-metadata">

**Author:** ![KillerSneak](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/killersneak/32/754802_2.png) [@KillerSneak](https://forums.unrealengine.com/u/KillerSneak)\
**Post date:** [August 31, 2015, 8:48am UTC](https://forums.unrealengine.com/t/swipes/887/18 "2015-08-31T08:48:41Z")

</div>

So the above method’s work but it’s kind of clumsy. In a RTS/Tower Defense game you want to be able to move the camera freely and swipe it all around. The above method only allows for static movement Left/Right/Up/Down. How can I have a free moving/swipe camera? Would it be a better idea to plug/attach the camera to the left virtual joystick…

---

<div class="post-metadata">

**Author:** ![KillerSneak](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/killersneak/32/754802_2.png) [@KillerSneak](https://forums.unrealengine.com/u/KillerSneak)\
**Post date:** [September 2, 2015, 1:22pm UTC](https://forums.unrealengine.com/t/swipes/887/19 "2015-09-02T13:22:39Z")

</div>

Anybody? Is there a way to have a free moving camera with swipes instead of the simple up/down/left/right

---

<div class="post-metadata">

**Author:** ![Creey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Creey](https://forums.unrealengine.com/u/Creey)\
**Post date:** [January 6, 2016, 3:45am UTC](https://forums.unrealengine.com/t/swipes/887/20 "2016-01-06T03:45:17Z")

</div>

Hello Guys, so I made a version for diagonal swipes!  
I hope you can understand it with the screenshots. :eek:  
You can even combine the two (normal swipes and diagonal swipes) for 8 swipe directions!  
On request I can also post the way with 8 directions.

 ![DiagonalSwipe.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/4/6/46c3277fb7c0038d43c3cd14d961eb0b46ec9af1.png)  
 ![DiagonalSwipe.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/0/c/f0c6f171f6bfc85424df3fce08b715dad4a406cd.png)  
(If something isn’t working, please post it!)

**- Creey**

[Next page](https://forums.unrealengine.com/t/swipes/887.md?page=2)
