How to import a dae to SceneKit for ARKit

北城以北 提交于 2019-12-08 05:57:42

问题


If I run Xcode's ARKit project template, I can move around the default ship as expected.

I have tried importing some dae models that I have exported from Blender, switching the ship to the new item but keeping the code the same. They always show in view but position in front the camera. If I try to move around the model it sticks infront of the camera and doesn't stay in the same virtual space.

I have also tried importing a dae from another tutorial and that works as expected.

Does anything need setting when exporting a 3d model as a Collada dae file to make sure it will anchor to a position in ARKit?


回答1:


When importing 3D-models for ARKit make sure to check:

  • the scale of your file. One unit equals 1 meter
  • The model should be centered in the coordinate origin to make it easy to position the model

Try to import the file in the SceneKit editor in Xcode and check if it gets imported correctly.



来源:https://stackoverflow.com/questions/45404877/how-to-import-a-dae-to-scenekit-for-arkit

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