iosobjective-ccocos2d-iphonecocos3d

Cocos3d : Set CC3Scene backdrop to transparent


In one of the ViewController of my app I have added a CCGLView, on top of which I'm adding CC3Layer to show the model and animate it. I want the background of the CCGLView to be transparent, but I'm unable to set the backdrop color of CC3Scene to transparent and by default if backdrop node isn't added the background color is black. And I have set CCGLView's backgroundColor to [UIColor clearColor] but still no luck.


Solution

  • I got to know how to do it, we just have to set backdrop node to following:

        self.backdrop = [CC3Backdrop nodeWithColor:ccc4f(0.0/255.0, 0.0/255.0, 0.0/255.0, 0.0)];
    

    Thats all, the CC3Scene background become's transparent.