Hover Effect for Direct Touch

The wwdc video "Design for spatial input" talks about hands and direct interaction, and uses the example of the keyboard (at around 17:10). The keyboard buttons display a hover state as that gets brighter as the finger gets closer. What do I have to do as a developer to implement this?

I understand that hoverEffect and HoverEffectComponent respond to eye contact. Do they also automatically respond to direct touch? Or is there something else that I need to do?

The hover effect is activated by either gaze or a direct touch (finger), depending on how the InputTargetComponent is set for the entity.

You'll need to set the input target component for any interactions with entities, and the default initialiser (InputTargetComponent()) allows both direct (touch) and indirect (gaze + pinch) interactions to trigger the hover effect.

Hover Effect for Direct Touch
 
 
Q