[ASK] Add Children to Repeating Background

Hi,

I’m struggling since yesterday to find a way to add sprite into repeating background.

The method that I used for repeating background is this.

@
ccTexParams tp = {GL_LINEAR, GL_LINEAR,GL_REPEAT , GL_REPEAT};
background->getTexture()->setTexParameters(&tp);
@
I’m using offset and SetTextureRect() to make background repeating overtime.

I want its children to be a random spawn at edge of the screen.,
speed is the same as i set the background, and deleted if it leave the screen.
I tried to set the texture by using same offset as the background, but didn’t have any luck so far. Its children just didn’t show up.
Any help will be greatly appreciated. Thanks.

Solved by simply children->setposition according to background’s offset