[Solved] Moving camera making collision boxes not line up correctly

Are you using multiple layers?

yes, ill attach an image if you want.

Are NewObject and collisions are on different layers? If so, you’ll need to move the camera for both layers. The events as they stand only move the camera for Layer3.

yes. do you want me to make two centered cameras for both layers? or one for the two layers, if so how would I do that. Thank you

One action for each layer. You can copy and paste the action you have, and then edit the duplicated action to change the layer to the one collisions is on.

ok ill try this and keep you posted

Is this what you want me to do?
image

Is collisions on the layer called “Layer”? Click on it in the scene editor, and check it’s properties in the right panel to confirm.

yes, The box is now in the middle of the screen and constantly follows around the cam now.

So it works properly now?

Sorry! I should have clarified that I wanted it just to be a stagnant hitbox on the ground, not something that follows around the player. I can send gameplay if you want.

Ah, sorry, I missed the incorrect action in your event screen shot.

You need the second camera action to also follow NewObject, not collisions. Keep the layer as “Layer”.

ok I did it, but the collision is in the same place, (give or take a block or two up)

Can you screen shot your events again?

yes, sorry I had to get on my other account because my first one hit the comment limit.

There’s something not quite kosher here. Could you zip and upload the project onto an file server, and provide the link? Either in this thread or PM.

yeah sure this is just straight-up the save file for the project

Your NewObject is on Layer2 :

image


You need to move the camera for that layer too, like :

image


Keep in mind every layer has it’s own camera, and the contents of all the cameras are combined to the screen. Moving a camera in one layer does not move the cameras on the other layers. That’s how a UI layer works; the camera on a UI layer doesn’t move.

thank you so much! you have no idea how long I was working on that!