简体   繁体   English

Android: handle click on 3D object arcore, android studio - JAVA

[英]Android : handle click on 3D object arcore, android studio - JAVA

I'm working on an AR Application for Android with Google ArCore SDK (using Android Studio and Java).我正在使用 Google ArCore SDK(使用 Android Studio 和 Java)为 Android 开发 AR 应用程序。 I have a problem to handle invents: tap or clic on displayed image/3D Object, weither it is about Augmented images or placing a permanent anchor.我有一个处理发明的问题:在显示的图像/3D Object 上点击或单击,无论是关于增强图像还是放置永久锚点。 Please do you have any example of how to handle click on 3D object in Android Studio?请问您有任何关于如何在 Android Studio 中点击 3D object 的示例吗? Thank you.谢谢你。

From this post :从这篇文章

ARCore is not supporting this feature. ARCore 不支持此功能。 You need to do it by yourself.你需要自己做。

The most recommended method is use of ray casting.最推荐的方法是使用光线投射。 Assuming you're using OpenGL, this post describes some methods of using ray casting in the way you need.假设您使用的是 OpenGL,这篇文章描述了一些以您需要的方式使用光线投射的方法。

After looking through deep research, I found out that there is an open existing project for sceneform that is still working.经过深入研究后,我发现有一个开放的现有场景形式项目仍在工作。

You can find the project here: https://github.com/SceneView/sceneform-android你可以在这里找到项目: https://github.com/SceneView/sceneform-android

and some Android Java samples there: https://github.com/SceneView/sceneform-android/tree/master/samples还有一些 Android Java 样品: https://github.com/SceneView/sceneform-android/tree/master/samples

But pay attention, it seems that some methods in samples are deprecated.但请注意,样本中的某些方法似乎已被弃用。 I'm working on integrating this in my Augmented Image project but I have some trouble finding corresponding new methods for some of them.我正在努力将其集成到我的增强图像项目中,但我在为其中一些找到相应的新方法时遇到了一些麻烦。

I will appreciate any help from someone who has already done it.我会感谢已经做过的人的任何帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM