How to get a progressbar to follow a camera?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Robster
:warning: Old Version Published before Godot 3 was released.

Hi all,

I have 3 scripts:
1 - Level script (this is where I place everything then play)
2 - character script (this has my character AND my camera that follows the character)
3 - progress script (this has my progress bar)

I dropped the character and the progress script into the level script.

It all works fine. There is a progress bar, there is a character.

When I move though, the progress bar obviously stays in one place and doesn’t follow. How can I get it to do this? I noticed there’s a property for position that says BEGIN, but I don’t see it following as I’d imagined.

A nudge in the right direction would be appreciated.

Thanks, Rob

:bust_in_silhouette: Reply From: volzhs

If you want to show something at fixed position, you can use CanvasLayer.
Try to add CanvasLayer and add ProgressBar under the CanvasLayer.

Perfect, that did exactly what I was after. Simply put in some offset values and it’s in place.

Thank you.

Robster | 2016-08-19 04:47