3
votes

I am just getting started with ARkit and Unity and tried the most basic thing, placing an object in the scene. I am placing the object 3 units in front of the camera and not attaching it to any anchor or generated plane. When I move my camera the object also slightly moves, which I believe should not happen.

How do I optimize the anchoring of the object in the AR space?

1

1 Answers

2
votes

At the start of AR, objects should move with the camera until ARKit is able to "initialize" and get its bearing.

After initialization, objects may move a bit as ARKit's understand of the world improves or if its view is obscured, etc.

However, large-scale movements should not be a common occurrence and small movements are just a nature of the tech right now.

If the "pre-initialization" movement is unsettling, you can consider hiding the object until the ARSession has initialized.

I've not actually used Unity with ARKit, so I can't help you with code there, but feel free to try out Viro React which is an cross-platform mobile AR/VR framework that lets you build AR/VR apps in React Native (and it's free!).