Displaying text at a higher resolution in a pixel perfect game using a subviewport makes the text move with the player camera

Godot Version

Godot 4

Question

I’m somewhat new to the Godot game engine and with that being said for the game I am currently working on I have a viewport height and width of 200 by 150 with an override of 1280 by 720 with the current font Im using being to big. In order to fix this Ive used a subviewport with a child of an instance of the scene containing the player, the environment, and all of the enemies. Outside of this subviewport I have a node containing all the UI for the game which includes my damage labels for when the player attacks an enemy. The problem with this is I can initially set their position to the enemy attacked but when I move the labels move with the camera. How do I get the labels to stay at their current position?

Heres a pic of the scene tree:

i dont see any camera in your screenshot here? where it’s located?

Hi, putting nodes inside a viewport will make them not move with the rest of the scene. You can either set the positions of the node yourself or use RemoteTransform2D.

But I would just not use a viewport and just change the font size.

the level scene is a child of the subviewport and the camera is a child of the player which is a child of the level scene heres a screenshot:

I need to use a subviewport due to the low resolution of my game and the fact that if I were to try and scale any text down it would become blurry without using a subviewport due to the size of the font.

What font are you using?

Heres a preview of the font:

Maybe you can change the font import settings and set antialiasing to none? I’ll try to find a font that is similar to that to test

I just tried this and it didnt work but also how would a remote transform help me?

Remote transform transfers its position to a target node, so like if your remotetransform is at 100, 100 and the target is at 0,0 the target will be at 100,100