Hi all,
I've got a scrolling platform game which I use the CCTMXTiledMap class to do the rendering. I use to update the screen (scroll it) by doing the following:
[node setPosition: newPos2];
Where newPos2 was calculated dependent on which way the player was moving (left or right). Ok this works well, but when wanting to implement Box2D collision, it won't work as the Box2D won't move with the scrolling map. So, am I better to use the Camera object to do the scrolling instead?
[self.camera setCenterX:_currentXPos centerY:0 centerZ:0];
[self.camera setEyeX:_currentXPos eyeY:0 eyeZ:20];
That way, my Box2D body's should work fine.
Any help and advice is much appreciated.
Regards,
Steve