Upper left corner of the screen relative to the scene

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By JulioYagami

Is there a function that returns a Vector2 from the upper left corner of the screen relative to the scene?

I need a node to be attached to this vector because it will be a HUD.

Here are a screenshot:

Here are a screenshot

I have a Camera2D with smoothing settings, so if I add this node as its child, it’ll be very strange.

JulioYagami | 2018-12-13 16:31

:bust_in_silhouette: Reply From: SleepyTom

What I’ve done is to add a camera to the scene and set it as the current camera, then add/instance your GUI/HUD as a child of the camera. That way the position of the GUI will always remain constant relative to the camera.

It can work but how I said, I have some smoothing settings on the camera

JulioYagami | 2018-12-13 17:48

I changes _process to _physics_process and it worked perfectly.

JulioYagami | 2018-12-13 18:48