简体   繁体   中英

ARKit - Update only the world coordinates origin

Once the user has scanned the environment and that I detected a plane, I would like the world origin anchor, which is the device position when the app opens (which is the origin of the 3D world), to be reset to where my device is right now so that the user can see my AR objects in front of him. (my objects are floating and not related to the floor but detecting a plane makes the objects more stable)

I didn't find a way to do that. It's linked to ARConfiguration but it doesn't seem like we can update the coordinate system without resetting all the tracking. Do you have any idea?

According to this post link , the documentation of the rootNode says:

You should not modify the transform property of the root node.

I still tried affecting the camera position to the position of the rootNode but it didn't change anything. So it seems like the only way is to create a new node and use it as a rootNode from where we are.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM