Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Vive Controller Thumbpad Swiping Detection

I can't work out how to detect a swipe motion across the thumbstick/pad.

I did try and come up with a solution, but it seems the float output from the Motion Controller Thumbstick/pad ticks every second, which I could not figure out how to get the difference in start position and end position, since you can't store it in a variable without it being erased, and I could not find a function to get the initial point of contact.

Any Solutions?

Product Version: UE 4.11
more ▼

asked Apr 27 '16 at 04:11 PM in VR

avatar image

261 13 12 93

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Hope this comes to some sort of help. Only problem with this method is, if the player doesn't lift up their finger for the swipe. This could be solved by having a check after setting the Last Position Variable with a Branch Comparing the distance between the Start and End position. alt text

swipeinput.png (224.2 kB)
more ▼

answered Apr 29 '16 at 12:53 AM

avatar image

26 2 3 7

avatar image Defaultsound May 01 '16 at 12:34 PM

Thanks for this, going to give it a try. Only thing I'm not sure about is the swipe direction. What are you doing in that event?


Okay I can get how to calculate the direction no problem. You are right about checking the distance, since at the moment you can just tap the bottom still.

avatar image Defaultsound May 17 '16 at 12:20 PM

Found a solution!

So actually its easier than I thought. Realised I could use gates to force the thumbstick value to be exact before opening another gate. Its a messy macro but it works, might not be the best but it feels and works the way I want it.

I ended up splitting the entire swipe into four sections. So the ranges are 0.9/4, so 0.225. The wider the ranges the more precise the swipe has to be, which in turn makes it feel bad.

alt text

viveue4swipe.png (180.6 kB)
avatar image NasteX Jun 08 '16 at 02:23 PM

@Defaultsound I also want to get some swipe functions with my controllers. But I dont get your solution, what are the inputs on both sequences? I think the first one is from the motion controller event, but the second one that closes the gates? Thanks in advance for clarifying.

EDIT: I found the answer, nice workflow. :)

avatar image Defaultsound Jun 08 '16 at 02:31 PM

So the input to the first sequences is the event tick, this checks each branch to see if the condition is met, once met the gate opens, moves on to the next.

The bottom sequence is a custom event that closes all the gates again. So once you have completed a swipe the custom event is triggered, and the gates are all closed to check for a new swipe.

avatar image NasteX Jun 13 '16 at 06:12 AM

Thanks for clarifying. :)

avatar image huanghuihu Jun 13 '16 at 02:40 PM

Thanks for the Sharing!It's really helpful!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Hi, another solution here, with only 2 directions (left and right) :

alt text

I've noticed that the axis input is constant (as event tick is), and does not support "do once" nodes. So in my setup, I set up the start swipe value once through a gate as the thumbstick is touched. Once it's done (and different from 0 btw), the gate is closed and the axis value is used to set the stop swipe value as it's touched. When the thumbstick isn't touched anymore, I compare the swipe distance (0,5 is needed to validate the swipe in this screenshot. After tests I've set it to 0.2 only to prevent unintentionnally swipes), and compare the difference between stop swipe and start swipe value to check the right or left direction. Don't forget to reset both start and stop swipe values after the direction check (and event).

Probably not optimized but it works well to (in my example) navigate in a horizontal menu step by step.

EDIT : I had to add a branch checking if Axis!=0 just before the Set stopswipe node. Without this it's set to 0 as one tick pass through the "touched" condition branch.

clipboard01.jpg (101.3 kB)
more ▼

answered Sep 07 '16 at 09:36 AM

avatar image

Teapot Creation
167 22 33 47

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question