我是 Cocos3d 的初学者。我使用 Cocos3D 项目模板创建了一个 cocos3d 项目。当我移动我的相机时,我希望 CC3MeshNode 会消失(它也在屏幕外,只有在相机移动到特定位置时才会出现)。我还设置了 shouldAutotargetCamera 和 shouldTrackTarget 是 YES 但它没有用。CC3MeshNode 总是出现在屏幕中心。如果你有 Cocos3D 的经验,请帮我解决。十分感谢。
问问题
360 次
2 回答
0
if I understood your problem correctly, you should do steps like these:
- set up your scene (add CC3MeshNode into it)
- set
viewController.isOverlayingDeviceCamera = YES;
(this is line from cocos3d template from AppDelegate class) - start to update your CC3Camera in scene with data from accelerometer. You could see my question (and answer) here on how to do that. The "update:" method is CC3Scene's one.
Hope that would help!
于 2012-12-27T16:49:28.110 回答
0
在 CC3Scene 中,onOpen 方法注释行 [self.activeCamera moveWithDuration: 3.0 toShowAllOf: self withPadding: 0.5f]。那么你的 meshNode 将不在屏幕中心。
于 2013-10-11T11:49:56.767 回答