At this stage I just don't understand control nodes, but I have something close to working. The following seems to position it on the screen just in the wrong position.
func update_position(position: Vector3) -> void:
var vert: Vector2 = Game.main.player.camera.unproject_position(position)
margin_left = vert.x
margin_bottom = vert.y
I have been trying to get this to work for over a day now. I'm so tired of looking at it. Using margin_top instead of margin_bottom for example it doesn't move and just stays off at the top of the screen at position 0 I have no idea why.
I assume I'm supposed to be using a node other than a container to position the margincontainer node inside. Like maybe progress should be a margincontainer inside of a margincontainer. So that way I can position the inner margincontainer to be the offset to center it.
Then the outer ones to set the position. Then I guess the container node I'm putting them all inside of, can just be size 0,0... because it doesn't seem to matter anyway.