UI is moving around when my character moves!

I am making a top-down 2d game. When the player character rotates, the UI (health bar) starts moving around as well.

If my character moves up, the ui slowly moves to the top of the screen.

How do I stop my UI from moving around?

Here is my parent hierarchy:

player – main camera – ui canvas – hp Panel – hp Text

The main camera has a script that keeps it rotated at a 90 degree angle.

have you tried:

  1. player – main camera
  2. ui canvas – hp Panel – hp Text

Thanks! It no longer slides around.

1 Like