A common way to move a renderable, possibly the main way at the time of writing, is to actually delete it and then create it in the new position or pose - e.g.:
- Delete existing renderable and remove from scene
- Create a new anchor and place it in the pose/position you want it
- Add the renderable to the new anchor you just created
In code:
private AnchorNode moveRenderable(AnchorNode markAnchorNodeToMove, Pose newPoseToMoveTo) {
//Move a renderable to a new pose
if (markAnchorNodeToMove != null) {
arFragment.getArSceneView().getScene().removeChild(markAnchorNodeToMove);
} else {
Log.d(TAG,"moveRenderable - markAnchorNode was null");
return null;
}
Frame frame = arFragment.getArSceneView().getArFrame();
Session session = arFragment.getArSceneView().getSession();
Anchor markAnchor = session.createAnchor(newPoseToMoveTo.extractTranslation());
AnchorNode newMarkAnchorNode = new AnchorNode(markAnchor);
newMarkAnchorNode.setRenderable(andyRenderable);
newMarkAnchorNode.setParent(arFragment.getArSceneView().getScene());
return newMarkAnchorNode;
}
The above is an edited extract from an example app - you can find the full source and modify it etc here: https://github.com/mickod/LineView
One other note - zooming in and out on a renderable may be a little confusing in an AR context. The renderable is like an object in the real world, so you could maybe talk about zooming in and out the entire camera view, or about making the renderable itself bigger or smaller.