是否可以在不使用 Unity 的情况下确定 ARCore / Sceneform(增强现实)中的用户注视?

Is it possible to determine user gaze in ARCore / Sceneform (Augmented Reality) without using Unity?

我可以使用 Unity 在 ARCore 中创建一个 gazePointer(如所示:https://codelabs.developers.google.com/codelabs/arcore-intro/#10),但是否可以在没有 Unity 的情况下(仅使用 ARCore / Sceneform)做同样的事情?

我需要在增强现实中复制的功能是检测用户在预定义的 2D 参考图像上的注视,如果注视超过(比如)5 秒,则应执行特定操作。我们可以假设 "gaze" 位于用户视图的绝对中心。

注意:我打算在像 Google Cardboard 这样的耳机的立体模式下执行此操作(即 phone 摄像头未被遮盖)。

您引用的 ARCore Unity 示例使用了 Frame class of the ARCore Unity API. The equivalent function in the ARCore Sceneform API appears to be the hitTest function of the Scene class 的 Raycast 函数。