Making UI with smooth camera movement

Hi , I am a 2D solo game developer who still learns about Godot and I have a basic game with basic abilities like moving, dashing , attacking etc. A moment ago I found position smoothing feature in Camera2D and I really liked it. But the problem begun after this moment. The UI textures like health and stamina bar is following the player instead of camera. So when I move, the character and UI comes to the place I move to, but because of position smoothing camera comes a little bit late. I want UI to stay at the corner of my screen.

It looks a little bit weird when I type the problem but I can’t add the video of it because I’m new to Godot Forum. If someone understands and helps, thank you from now.
(I added a image of problem)

Add/Move the UI inside a canvas layer, it can be inside the player

2 Likes

I tried it but the UI just disappeared. I can see it in the editor but not in the game.

I tried creating a canvas layer in another scene then putting UI in it. After that, importing the UI scene to player scene solves the problem.

2 Likes

Its not working

it is working, just tried it.

1 Like

ye i did something wrong

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.