简体   繁体   English

SceneKit:使用dae动画更新SCNGeometry

[英]SceneKit : update SCNGeometry with dae animation

I decided to use SceneKit for an awesome iOS project. 我决定将SceneKit用于一个很棒的iOS项目。 But i found a big issue. 但是我发现了一个大问题。

In my application, i load some animated .dae. 在我的应用程序中,我加载了一些动画的.dae。 It's well displayed. 显示得很好。 But the SCNGeometry of the node don't update, during the animation. 但是在动画过程中,节点的SCNGeometry不会更新。 I tried to check the presentationNode, but still the same. 我试图检查presentationNode,但是还是一样。 How can i get the updated value of the geometry ? 如何获取几何的更新值? Like vector. 像矢量。

That is how I can do it: 这就是我可以做到的:

SCNNode * mainNode = [[SCNNode alloc]init];
SCNScene * scene = [SCNScene sceneNamed:sceneNamed inDirectory:some/path/where/you/have/it options:nil];

for (SCNNode * node in [scene.rootNode childNodes]) {
    [mainNode addChildNode: node];
}

It should work in most cases if your DAE file contains animations. 如果您的DAE文件包含动画,则在大多数情况下应该可以使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM