How does one stop the HUB being "Smoothed", as it causes screen edge elements to drift off screen!!

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

When having the HUD as a child of the main player, when smoothing is enabled the hud elements appear to drift around the screen.

:bust_in_silhouette: Reply From: rossunger

You might want to make your HUD a child of a CanvasLayer node so it’s not affected by your camera

I grouped my HUD elements as children of a canvas layer node, which itself is a child of my main player and it works! Cheers

Pseudo Hierarchy:

Root
⠀|
⠀|—Player
⠀⠀⠀⠀⠀|
⠀⠀⠀⠀⠀|----- PlayerSprite2D
⠀⠀⠀⠀⠀|⠀⠀⠀⠀⠀|
⠀⠀⠀⠀⠀|⠀⠀⠀⠀⠀|------ WeaponSprite2D
⠀⠀⠀⠀⠀|
⠀⠀⠀⠀⠀|----- Camera2D
⠀⠀⠀⠀⠀|
⠀⠀⠀⠀⠀|----- HUDCanvasLayer
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀|----- HealthSprite2D
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀|----- WeaponSelectionSprite2D
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀|----- InventorySprite2D

h5n1xp | 2022-02-14 12:30