In ARCore, how to make node/anchor stick to camera?

Viewed 448

I am trying to get an object to stick to camera and follow its movement/rotation.

The idea is for a "fishing game" and i need the rod to be glued to the camera.

Is there a way to do this?

2 Answers

you can use ImageView or some other view over the FrameLayout to stick up with the screen. The rod is not a part or AR in any way.

If your fishing rod is a node type,you can bind it to camera.

I use java and ArSceneView for example:

node.setLocalPosition(new Vector3(0.1f, 0.1f, -1.0f)); arSceneView.getScene().getCamera().addChild(node);

I hope that I understand what you mean.

Related