我正在关注 ARCore 示例 ( https://github.com/google-ar/arcore-android-sdk ),我正在尝试删除已添加的对象 3d (andy)。 如何检测 ARCore 的点击事件是否击中了已添加的 3d 对象?
最佳答案
在这种情况下,使用listener
是很常见的方法:
private Node getModel() {
Node node = new Node();
node.setRenderable(modelRenderable);
Context cont = this;
node.setOnTapListener((v, event) -> {
Toast.makeText(
cont, "Model was touched", Toast.LENGTH_LONG) // Toast Notification
.show();
});
return node;
}
关于java - 检测带有 ARCore 的点击事件是否击中了已添加的 3d 对象,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46728036/