1

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];

}
Ninwinz
  • 50
  • 6
  • You should not be running the action on your `physics node`. Try running it on your content level node. – Tibor Udvari Jul 08 '14 at 13:11
  • I've tried running it on _levelNode, _loadedLevel, self, and _physicsNode. None of them work correctly, though I do get minor different results – Ninwinz Jul 08 '14 at 16:36
  • Could you post a zip with your project or a smaller demo project that illustrates the problem so I can take a more detailed look? – Tibor Udvari Jul 10 '14 at 12:29
  • I tried multiple things that each should have worked and had multiple people look at it. I've decided to use my own scroll instead. – Ninwinz Jul 10 '14 at 16:47

0 Answers0