I have an app with a cocos3d scene in which I have a 3D animated model. I want to add some effects to the scene and I was thinking of using planes textured with a sprite animation.
I've been able to add the full sprite image to the scene correctly, but this isn't obviously what I want to do.
CC3PlaneNode *sprite = [CC3PlaneNode nodeWithName:@"Sprite"]; [sprite populateAsRectangleWithSize:CGSizeMake(10, 10) andRelativeOrigin:CGPointMake(0, 0)]; sprite.location = cc3v(-0.5, -1, -5); CCTexture* tex2D = [CCTextureCache.sharedTextureCache addImage:@"equalizer.png"]; CC3Texture* tex3D = [CC3Texture textureWithCCTexture: tex2D]; tex3D.name = @"EqualizerTextureFile"; [CC3Texture addTexture: tex3D]; sprite.texture = tex3D; [self addChild:sprite];
I've noticed there is a CCSprite class that seems to be related to what I want to do, but it is incredibly hard to figure out how to use it, mainly since I have a cocos3D scene not a cocos2D one.