question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hologram Navigation Gesture gaze issue

See original GitHub issue

Using the InputManager prefab from the HoloToolkit and this code:

    [Tooltip("Rotation max speed controls amount of rotation.")]
    public float RotationSensitivity = 2.0f;

    private float rotationFactor, rotationFactor2;

    public void OnNavigationStarted(NavigationEventData eventData)
    {
        Debug.Log("Navigation is started");
    }
    public void OnNavigationUpdated(NavigationEventData eventData)
    {
        rotationFactor = eventData.CumulativeDelta.x * RotationSensitivity;

        rotationFactor2 = eventData.CumulativeDelta.y * RotationSensitivity;

        if (System.Math.Abs(eventData.CumulativeDelta.x) > System.Math.Abs(eventData.CumulativeDelta.y))
        {
            transform.Rotate(new Vector3(0, -1 * rotationFactor, 0));
        }
        else
        {
            transform.Rotate(new Vector3(-1 * rotationFactor2, 0, 0));

            //if this control structure doesnt work, try setting the other value to zero instead
        }

        Debug.Log("event X: " + eventData.CumulativeDelta.x);
        Debug.Log("event Y: " + eventData.CumulativeDelta.y);

    }
    public void OnNavigationCompleted(NavigationEventData eventData)
    {
        Debug.Log("Navigation is completed");
    }
    public void OnNavigationCanceled(NavigationEventData eventData)
    {
        Debug.Log("Navigation is canceled");
    }

The user can tap and hold and move their hand left or right (x-plane) to rotate along the Y axis and up and down (y-plane) to rotate the object on the X axis.

However there appears to be a bug. If the users gaze comes off the object, the rotation stops immediately until the users gaze returns to the object. Is this the intended functionality? Is there a way to preserve the current object being changed via the navigation gesture and allow it to continue being manipulated until the users hand leaves the FOV or releases the tap and hold?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
jvhgamercommented, Jul 27, 2017

Ok. Clear the stack on Navigation started, InputManager.Instance.ClearModalInputStack();, then push it onto the stack, InputManager.Instance.PushModalInputHandler(gameObject); and on navigation completed or canceled pop it, InputManager.Instance.PopModalInputHandler();

0reactions
StephenHodgsoncommented, Jul 27, 2017

In your own implementation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Gaze and commit - Mixed Reality
Manipulation gestures can be used to move, resize, or rotate a hologram when you want the hologram to react 1:1 to the user's...
Read more >
HoloLens 2 gestures for authoring/navigating in Dynamics ...
Learn how to use HoloLens 2 touch, hand rays, and gaze to navigate and manipulate holograms in Microsoft Dynamics 365 Guides.
Read more >
Hololens/hololens/hololens1-basic-usage.md at public
Instead of pointing, clicking, or tapping, you'll use your gaze, your voice, and gestures to select apps and holograms and to get around...
Read more >
move and rotate holograms — Mixed Reality Developer Forum
cs for moving and rotating holograms. I re-used the GestureAction.cs from Holograms 211. What I want to do with the hologram: rotate object...
Read more >
Scale Impacts Elicited Gestures for Manipulating Holograms
These results suggest that gesture designers need to account for scale, and should not simply reuse gestures across different hologram sizes. ResearchGate Logo....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found