How to make the camera just little bit ahead of the player

The character is in the middle of the camera how to make the camera ahead of him just a bit ?

1 Like

You can center the camera on the player and then move it a little upwards:

Conditions: No conditions (always) Actions: Center camera on Player Do - 25 to the Y position of camera

Or center and move the camera yourself:

Conditions: No conditions (always) Actions: Do = Player.PointX(Centre) ; = Player.PointY(Centre) - 25 to the center position of camera

didn’t work … the thing here is whenever i use center the camera on (object) and then use with it do (whatever) to the position of the camera … it doesn’t work … only one of them can work and i need both to work at the same time .

What I did on a top down space shooter was to add a point on my sprite a little further on the front. Then I added a sprite with a small transparent Image and gave it x and y on that point. Finally I centered the camera on that transparent sprite…

I hope it helps…

1 Like

Sorry but can you explain more ?

I assume you have the camera centered on the player…

If you add a point on the sprite of the player that is a little bit to the front of the player then you can give the x and y coordinates of the camera to that point, meaning that the camera will always be in front of the player…

What type of game are you developing? Is it a platformer, top down, isometric etc??? If i know that i could be more specific…

yeah the camera is centered on the player … it’s a platformer and the camera need to go on the X and Y …
what i don’t understand is adding a point on the sprite of the player that is a little bit to the front of the player ? how can i do that ?

Do you want the player to be positioned on the left side of the screen all the time or you want to the player to move with a bit of a delay and stay a bit behind the camera when move but otherwise be in the center of the screen?

Yeah to be positioned on the left side of the screen all the time

Are you sure it doesn’t work?, it works fine here:
CameraOffset.png

1 Like