Pretty self-explanatory, the hitbox is not lining up with the sprite because of the moving camera.
I have attached my code below:
keep in mind, the cam works fine, it’s just the hitbox that is not lining up that’s the problem.
I will attach more images if needed, I cant add them to the post at the moment because I just made my account.
here is my hitbox for the collisions:
That won’t be the problem. Camera movement does not affect hitboxes.
What exactly do you mean the hitboxes aren’t lining up? How have you checked this? What does the hitbox of NewObject look like?
Can you put this line in your events, and post a screen shot:
Thank you for the reply, I attached the hitbox for NewObject:
I turned on the command you sent, and the red square is where I want the collision to be, and the circled part is where the hitbox ultimately showed up:
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?
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.