ARKit - Update only the world coordinates origin

て烟熏妆下的殇ゞ 提交于 2019-12-06 14:46:28

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/47270579/arkit-update-only-the-world-coordinates-origin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!