为什么将 Collada 模型添加到 Away3d 中的视图后无法移动它?

发布于 2024-08-26 15:50:41 字数 324 浏览 7 评论 0原文

我有一个在 Google 3d Warehouse 上找到的 Collada (.dae) 文件。使用 Away3d,我可以使用以下代码加载该文件并将其显示在我的视图上:

var object3d = Collada.parse(FooXML, { material:"white", x:0, y:0, z:0 });
view.scene.addChild(object3d);

问题是它只是漂浮在空间中,无论我如何通过 .x、.y 或 .z 调整位置,它永远不会离开它的位置。

我正在使用 Flash cs4 和 Away3d 的最新稳定版本。

I have a Collada (.dae) file that I found on Google's 3d Warehouse. Using Away3d, I'm able to load the file and display it on my view using the following code:

var object3d = Collada.parse(FooXML, { material:"white", x:0, y:0, z:0 });
view.scene.addChild(object3d);

The problem is that it's just floating out in space and no matter how I adjust the position via .x, .y, or .z, it never moves from its spot.

I'm using Flash cs4 and the latest stable release from Away3d.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

森林很绿却致人迷途 2024-09-02 15:50:41

您是否在平移 collada 对象后重新渲染场景?

你想如何翻译这个物体?如果您需要移动它,那么您应该在 init 对象中设置它,例如:(FooXML, {material:"white", x:100, y:100, z:-70 })

are you re rendering the scene after translating the collada object?

how are you trying to translate the object? if you need to move it then you should set it in the init object eg: (FooXML, { material:"white", x:100, y:100, z:-70 }).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文