MixedRealityToolkit / MixedRealityToolkit-Unity

This repository holds the third generation of the Mixed Reality Toolkit for Unity. The latest version of the MRTK can be found here.
BSD 3-Clause "New" or "Revised" License
374 stars 96 forks source link

[MRTK3] How to trigger gaze active hover events without hand raise #247

Closed IssueSyncBot closed 1 year ago

IssueSyncBot commented 1 year ago

Original issue opened by:

@pajama pajama


Currently GazeActiveHover is only triggered if a hand is tracked. How do I trigger these state events on buttons without tracking the hand.

HL2

Unity editor version

2020.3.38f1

Mixed Reality Toolkit release version

MRTK3.pre11

Thank you!


ISSUE MIGRATION

Issue migrated from: https://github.com/microsoft/MixedRealityToolkit-Unity/issues/11107

IssueSyncBot commented 1 year ago

Original comment by:

@Zee2 Zee2


You can use IsGazeHovered.

IssueSyncBot commented 1 year ago

Original comment by:

@pajama pajama


@Zee2 Thanks for responding!

In the statevisualizer I hooked up the same animation to PassiveHover as the one in ActiveHover, but it still doesn't trigger any animation with just gaze.

I did validate that IsGazeHovered is firing on the PressableButton, I'm just not sure how to get that event to trigger the hover animation on the statevisualizer. I want to use the same playable api. Is that possible, or do I need a completely separate animation setup to do this?

IssueSyncBot commented 1 year ago

Original comment by:

@Zee2 Zee2


The animation should work in PassiveHover on StateVisualizer; that's actually how we already drive the subtle content "bump" that appears when you gaze at a button without your hand up. If that didn't work, you wouldn't see any of the buttons animate when you gazed at them. Curious what is causing that not to work for you... have you tried removing your animation from ActiveHover and putting it in PassiveHover exclusively?