Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Plotting Thumbstick Motion as an Instruction

Discussion in 'Scripting' started by UnityGuy1988, Aug 3, 2023.

  1. UnityGuy1988

    UnityGuy1988

    Joined:
    Jan 12, 2020
    Posts:
    24
    Can anyone tell me how would I go about tracking the movement of an analogue stick for a certain period and use this input to affect an action in-game? For example, if I were to move the right stick in an up/down motion, or sweep from down around to the right. Fans of certain popular skating games might know what I mean...
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,561
    This is broadly referred to as input gesture recognition.

    Fighting games use it a lot, like for "hadouken" style attacks.

    I made one for VR "Yes" and "No" head movements (source in comments):



    Otherwise, check out some actual Youtube tutorials. There's a lot of choices and a lot of details to it.

    Screen Shot 2023-08-03 at 2.34.59 PM.png
     
    UnityGuy1988 likes this.
  3. UnityGuy1988

    UnityGuy1988

    Joined:
    Jan 12, 2020
    Posts:
    24
    Thanks very much for the info, I'll be sure to check it out. And there's a name for it, "Gesture Recognition", that's useful to know!