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.
asked Apr 27 '16 at 04:11 PM in VR
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.
answered Apr 29 '16 at 12:53 AM
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.
Follow this question
Once you sign in you will be able to subscribe for any updates here