在 cocos3d 中,我想复制一个来自 .POD 文件(earth.pod)的旋转地球的 CC3MeshNode。这就是我制作 1 的方式:
[self addContentFromPODFile: @"earth.pod"];
CC3MeshNode* earth = (CC3MeshNode*)[self getNodeNamed: @"Sphere"];
[earth setRotation:cc3v(0.0, 0.0, 0.0)];
CCActionInterval* rotate = [CC3RotateBy actionWithDuration: 1.0
rotateBy: cc3v(0.0, 30.0, 5.0)];
[earth runAction: [CCRepeatForever actionWithAction: rotate]];
earth.location = cc3v(0, 0, 0);
现在我想创建第二个地球:
CC3MeshNode* earth2 = (CC3MeshNode*)[self getNodeNamed: @"Sphere"];
[earth2 setRotation:cc3v(0.0, 0.0, 0.0)];
CCActionInterval* rotate2 = [CC3RotateBy actionWithDuration: 1.0
rotateBy: cc3v(0.0, 30.0, 5.0)];
[earth runAction: [CCRepeatForever actionWithAction: rotate2]];
earth2.location = cc3v(5, 0, 0);
但这摆脱了原来的。如何从可以复制的 POD 文件创建 CC3MeshNode?
谢谢 :)