Not in the images above, but when I put the object on the Base Layer, this is what I see. The grey rectangle is in the center of the game screen and I can’t move it like I could before.
It is moving, but the camera is centring on it, so it is displayed in the middle of the screen.
[edited, 'cos this is plainly wrong] If you put it back on the other layer, and use that layer in your center camera action, you should see the other objects on the base layer moving
Not for me. It doesn’t move at all. The grey box has the Platformer Object behaviour. When I press the keys to move or jump, nothing happens. The background doesn’t change or anything.
The other objects weren’t on the Base Layer. I just moved them all to the base Layer with the grey rectangle and now they work.
I guess that solves the issue, but why is it that the camera actions only work when all the objects are on the Base Layer? I’m asking because I’d like to make my platformer with different layers
If you have the other objects on different layers, you’ll have to move the camera for each of those other layers too.
Imagine each layer as a separate sheet. These layers of sheets have a small frame over part of them. Anything within that frame is what gets displayed on screen. When you move the camera for a layer, it’s similar to just moving that layer.
And what is displayed or viewed in the frame changes as that layer moves around.
The other layers don’t move, so what they display in the frame doesn’t change.
When you centre the camera on an object on a layer, you are shifting the layer so that the object stays in the centre of the frame. Again, you are only moving that one layer, and not the others.
You use a “Center camera on PlayerHitBox” action for each layer, and specify the layer in the layer paramter. It’ll just use the PlayerHitBox position as the camera position; the object doesn’t have to exist on the layer you are centring, it just uses that object’s co-ordinates for that layer’s camera.