我尝试将一个大的3D物体(从.obj文件生成)放在摄像机前面,但无法做到。该模型被放置时以击中结果为中心点。有什么方法可以完成此操作吗?
我尝试将一个大的3D物体(从.obj文件生成)放在摄像机前面,但无法做到。该模型被放置时以击中结果为中心点。有什么方法可以完成此操作吗?
// Place the anchor 1m in front of the camera.
Log.d(TAG,"adding Andy in fornt of camera");
Frame frame = arFragment.getArSceneView().getArFrame();
Session session = arFragment.getArSceneView().getSession();
Anchor newMarkAnchor = session.createAnchor(
frame.getCamera().getPose()
.compose(Pose.makeTranslation(0, 0, -1f))
.extractTranslation());
AnchorNode addedAnchorNode = new AnchorNode(newMarkAnchor);
addedAnchorNode.setRenderable(andyRenderable);
addedAnchorNode.setParent(arFragment.getArSceneView().getScene());