triggerTap method
Manually trigger a tap/click event on the currently gazed target.
Implementation
void triggerTap(RaycastHit? hit) {
if (_gazeTargetId != null) {
onTap?.call(_gazeTargetId!);
onDwellSelect?.call(_gazeTargetId!);
// Trigger Pointable component if registered on the node
if (hit != null && hit.node.pointable != null) {
hit.node.pointable!.press(hit);
Future.delayed(const Duration(milliseconds: 100), () {
hit.node.pointable?.release();
});
}
}
}