Skybox draws properly in container, but in display group isn't drawn?

*sigh* Title pretty much says it all.

Grab the latest code from here:

https://www.dropbox.com/s/2wjtz3mhjjjngbr/Skybox.zip

If you run it now you should see a nice rotating skybox with a square image dumped in the middle (this was a sanity check as I couldn’t get anything to show).

If you now comment out line 25 in game.lua (the one that disables clipping, IE using the container), and re-run it, I only see that square image in the middle, skybox is gone.

The only code different for the two things are in libs/skybox.lua, starting from line 26:

[lua]    – Create ‘self’ (either a container or group)

    local self

    if params.clip and params.clip == true then

        self         = display.newContainer( width, height )

        self.anchorX = 0.5

        self.anchorY = 0.5

        self.clip    = true

    else

        self      = display.newGroup()

        self.clip = false

    end

    if params.parent then params.parent:insert( self ) ; end

    self.x = x

    self.y = y[/lua]

So when the clip value is set in game.lua, it runs the part that creates self as a container, and when it is set to false or not included, it runs the part that creates self as a group. Apart from that, everything else runs identically. Except… no images.

Can anyone else confirm this or not? I had 1 or 2 times when the images *did* show up in groups, but was never able to replicate it, and I’m going a bit mad…

This was using daily build 2013.2090 FWIW.

I found out what the problem was - scale is a function in groups but not a container, and I was using it for my own neferious ends. Change of property name and all is well :slight_smile:

I found out what the problem was - scale is a function in groups but not a container, and I was using it for my own neferious ends. Change of property name and all is well :slight_smile: