I’m using camera.lua module in my mobile game. Here it is : http://goo.gl/djE49
There is no problem when I’m using the basic camera and focusing property.
Think about Angry Birds. You know, camera is focusing on the bird which is flying. But camera isn’t focusing when the bird is flying so lower or so higher. In other words, there are bounds for the camera movement. I need to make it in my game.
I found something on Camera.lua module like “clampPosition” and “setClampingBounds”. (you can search them in the code that i gave in the above) But I didn’t understand, how should I edit params make rectangular clamping bounds.
I solved that problem using an enterFrame Runtime listener when camera is active.
I checked the position of the camera inside the listener function and bound it with using if statements like that :