Hey guys! I have what I think is a simple camera question. It has been some time since I have used a camera but I am looking to have the camera follow the player but only once they reach the edge of the screen on the Y axis. The size of the stage is 640x480 this is the code that I have, the camera does not move at all. When I place a 200 in where the 480 is, it moves but not when I want it to. The character is 64x64 pixels.
FP.camera.y = (this.y - (FP.halfHeight - 64));
FP.camera.y = FP.clamp(FP.camera.y, 0, (480 - FP.height));
Thanks guys!