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?

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.

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?

EDIT:

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.

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.

@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. :slight_smile:

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.

Thanks for clarifying. :slight_smile:

Thanks for the Sharing!It’s really helpful!

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

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.