Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

HTC Vive: Detecting a "flick."

Discussion in 'AR/VR (XR) Discussion' started by SuperSonic68, Oct 18, 2016.

  1. SuperSonic68

    SuperSonic68

    Joined:
    Feb 8, 2013
    Posts:
    4
    Hey, all! I'm developing a wizarding-style game using the HTC Vive. As I'm only beginning development, I'm unsure of where to begin when it comes to detecting certain gestures using the controllers. I am aware that there are systems like Infinite Gesture out there, but I'd like to try to write something myself.

    Put simply, I'd like to detect when the player flicks the controller forward as if casting a simple spell with a magic wand. How would I go about writing such a script using the Vive?

    Thanks!
     
  2. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,276
    You have to record the data that is produced by the controller if you do the flick gesture, analyze the data and Programm a rule / function that can reliable tell if the movement data from the controller did match the rule of a flick.