Hologram Navigation Gesture gaze issue
See original GitHub issueUsing 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:
- Created 6 years ago
- Comments:7 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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();
In your own implementation.