Search Unity

Using Hand movement values from HoloLens Input

Discussion in 'VR' started by Shubham_16, Dec 30, 2016.

  1. Shubham_16

    Shubham_16

    Joined:
    Sep 19, 2016
    Posts:
    33
    I am trying to implement a feature where user move his hand in world space and i need to move a GameObject in similar proportion in HL. Problem is my Gameobject is constrained along standard X,Y Z axes. When user moves his hand, i take the movement value (difference of initial and final hand position) in anyone of the Axes. But it doesn't come smooth. Any suggestion on how to take hand movement value in particular axes (X, Y orZ) and make smooth movement of gameObject in similar proportion.
     
  2. Unity_Wesley

    Unity_Wesley

    Unity Technologies

    Joined:
    Sep 17, 2015
    Posts:
    558
    Hello,

    There are a few ways to do this using gesture recognizer. You can use the navigation gestures for X,Y, and Z to be able to track your hands movement and then move the game object when the location is updated.

    You could do this by using the Vector3 for the relative position of the hand during the Update Event for the gesture.

    I think if you need to smooth out the movement, you can multiply the movement by Time.deltaTime, although it shouldn't be to bug of an issue using the gesture recognizer.

    Other Ideas:
    You could use the same thing using the manipulation gesture or the Navigation on the rails events.
    You could also use the interaction manager as well