Hello.
This simple thing is proving tricky. I have a camera which follows a Chipmunk player object. However, it current'y follows it in X and Y, whereas I just want it to follow in X. I want a certain degree of side scrolling, vertical scrolling should be zero. My reason for using the camera is because I have a lot of physics shapes in my layers and it makes more sense to me to move the camera and not the static shapes.
Current code:
float cameraX, cameraY, cameraZ;
[gameLayer.camera centerX:&cameraX centerY:&cameraY centerZ:&cameraZ];
[gameLayer.camera setCenterX:_landerBodyS.position.x-80 centerY:cameraY centerZ:0];
[gameLayer.camera setEyeX:_landerBodyS.position.x-80 eyeY:_landerBodyS.position.y+80 eyeZ:415];