I have simple side scrolling game setup. The camera follows the player. This centers the camera on the player. Is it possible to set an offset to position the camera view in front of the player?
I didn’t see this in the docs, so I’m assuming it’s not a feature (yet…). I’m thinking of two systems to implement this.
a) create a dummy object that always sits in front of the player object. I was thinking of using an empty group, and setting it’s position on enterframe
b) Modify Ceramic. I figure I’d add two variables for offset_x, and y. Change the signature of setCameraFocus to setCameraFocus(f, ox, oy). Set some default values of 0 here. The tricky part is modifying view.updateCamera(). From what’s there I’m guessing I can just add the offset to targetX and targetY at the end. Something like:
map.viewX=targetX+offset_x
map.viewY=targetY+offset_y
I probably could have tried this in the time it took me to write this post… Let me get back to you…

