(Solved) Make character position adjust to screen size

My character won’t stay at the center when I adjust screen. I’m replacing the character1 at the center with that character2 on the side part of the scene. I copied how I coded my character1 with character2 but this happened.

Character2 starts off at the center and when I adjust window size this happens

They both are on a different layer because when I try and put them both on the same layer other objects on the scene just don’t adjust to screen anymore.

This is how I tried to do it. I’ve been trying to figure out why this happens for days :frowning:


Are they the same size and are their origin points in the same spot?

Try setting the CenterX of the sprite to CameraCenterX()… maybe the origin is far from the sprite, so you should try the centerx point rather than just x. or you could try matching the x and y of a point on the first sprite and set the center position (or origin) to the center (or origin) of the initial sprite. My best guess.

Also make sure this is not set to happen one time. also check its not under a condition (obviously unless you only want it to happen under special circumstances), you want it to always do this. if theres a condition that could mess with it as well. so should look like one of these

1 Like

Thank you for this @samuelm9 !

1 Like