[Solved] "Center camera on object" not working properly

Hello, fellows!

I’m newbie at GDevelop, so, sorry if it’s too basic.

I’m working on a isometric game. The player has 8directions behavior.

When I set the camera to center the player, it doenst work properly.

The camera moves with the player, but not at same speed, so the player is never on the center, and at some point it gets outside the screen.

What am I doing wrong? Isnt this action supposed to be that simple?

Thanks!!

Can you provide some screen shots of the camera following the player events?

1 Like

This is the only one… it’s how tutorials teach

Is the player on the base layer?

Do you have only 1 player object - check this by clicking on the list of onstance button in the editor (this button image)

No, my tiles are on base layer.
The player is on the layer above.

Yes, only 1 player object.

You’ll need to move the camera on the player’s layer too - each layer has it’s own camera, and you need to move the camera for each layer you want to follow the player’s position

The base layer camera is following the player’s position as if the player were on the base layer. On the player’s layer, the camera is not moving (no actions telling GDevelop to do so) and so the player will be moving off screen; the camera on that layer hasn’t been told to follow the player.

2 Likes

Ok! So how do I tell the camera on the player layer to follow it?

Add a new centre camera on object action, and select the layer on the parameter list on the right side of the pop up box.

1 Like

Niiiice! It worked! Thanks a lot!!

Sorry bothering you.

Do I need to set the topic as [SOLVED]? How?

It’s not a bother in the slightest - the forums are here to help :slight_smile: .

I’ve upated the title.

1 Like