I'm a beginner of Cocos3d. I create a cocos3d project using Cocos3D project template. When I move my camera, I want the CC3MeshNode will disappear (it's also out of screen and only appear when camera move to specific location). I also set shouldAutotargetCamera and shouldTrackTarget is YES but it didn't work. The CC3MeshNode always appears at screen center. If you have experience of Cocos3D, please help me to solve it. Thank you a lot.
Asked
Active
Viewed 362 times
2 Answers
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!

Community
- 1
- 1

medvedNick
- 4,512
- 4
- 32
- 50
0
In CC3Scene, onOpen method comment the line [self.activeCamera moveWithDuration: 3.0 toShowAllOf: self withPadding: 0.5f]. Then your meshNode will not be in screen centre.

The Rock
- 1
- 4