我需要通过触摸控制在一个片段中加载sfb模型。
ModelRenderable.builder()
.setSource(this, Uri.parse("https://unembittered-vector.000webhostapp.com/3dmodels/car.sfb"))
.build()
.thenAccept(renderable -> andyRenderable3 = renderable)
.exceptionally(
throwable -> {
Toast toast =
Toast.makeText(this, "Unable to load andy renderable", Toast.LENGTH_LONG);
toast.setGravity(Gravity.CENTER, 0, 0);
toast.show();
return null;
});
模型在ArFragment内部渲染,后者打开camera。我需要使用带有触摸控制的基本片段布局来达到同样的效果。
arFragment.setOnTapArPlaneListener(
(HitResult hitResult, Plane plane, MotionEvent motionEvent) -> {}