问题
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