1 decade ago by fulvio
I'm in the process of making a platformer (think: Megaman).
I have a few issues with the camera and being able to look ahead as much as possible when either standing close to the left of the screen or running back the other way.
This is the following code I'm using:
What this is doing is placing the character closest to the left side of the screen. This is fine until I turn around and start running back. The character stays there and so does the camera.
What I'm trying to achieve is that the camera moves depending on which side the character is facing and at the same time displays most of the screen. At the moment it's only displaying most of the screen when the character is facing right.
I want to achieve this effect, because most of my enemies might be running around and I won't see them until the very last minute.
Any help would be greatly appreciated.
I have a few issues with the camera and being able to look ahead as much as possible when either standing close to the left of the screen or running back the other way.
This is the following code I'm using:
this.camera = new Camera(((16 * 16) - ig.system.width), ig.system.height / 3, 5);
What this is doing is placing the character closest to the left side of the screen. This is fine until I turn around and start running back. The character stays there and so does the camera.
What I'm trying to achieve is that the camera moves depending on which side the character is facing and at the same time displays most of the screen. At the moment it's only displaying most of the screen when the character is facing right.
I want to achieve this effect, because most of my enemies might be running around and I won't see them until the very last minute.
Any help would be greatly appreciated.