如何将DAE导入到SceneKit for ARKit [英] How to import a dae to SceneKit for ARKit

查看:166
本文介绍了如何将DAE导入到SceneKit for ARKit的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我运行Xcode的ARKit项目模板,则可以按预期在默认装运范围内移动.

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

我尝试导入一些我从Blender导出的dae模型,将飞船切换到新项目,但保持代码不变.它们始终显示在视野中,但位于相机的前面.如果我尝试在模型上四处移动,它会粘在相机的前面,不会停留在相同的虚拟空间中.

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.

我还尝试了从另一个教程中导入dae,并且可以按预期工作.

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

将3d模型导出为Collada dae文件时,是否需要进行任何设置以确保其锚定到ARKit中的某个位置?

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?

推荐答案

为ARKit导入3D模型时,请确保进行以下检查:

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

  • 文件的大小.一个单位等于1米
  • 模型应以坐标原点为中心,以便于放置模型

尝试在Xcode的SceneKit编辑器中导入文件,并检查文件是否正确导入.

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

这篇关于如何将DAE导入到SceneKit for ARKit的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆