I have a ball object that falls straight down a level made in SpriteBuilder as a layer. The level is added to the gameplay scene, which has a ccnode (_levelNode) as a child of the physics node. However, when the game runs it either doesn't scroll, or the view is messed up.
My code is:
- (void)didLoadFromCCB {
//_physicsNode.debugDraw = TRUE;
_loadedLevel = [CCBReader load:@"levels/Level1" owner:self];
[_levelNode addChild: _loadedLevel];
}
- (void)onEnter {
[super onEnter];
self.userInteractionEnabled = TRUE;
self.isGamePaused = FALSE;
_followBall = [CCActionFollow actionWithTarget:_ball worldBoundary:[_loadedLevel boundingBox]];
[_physicsNode runAction:_followBall];
}