Well I would like to explain properly but as English is not my first language please try to understand what I say, so I am trying to learn godot and game development in general but as I'm new to this I'm facing many issues every now and then so for now I wanted to make my touch screen control stay on the screen on the same place,which was working fine until I added camera2d node to my player which started following my player(which is good) but my controls are moving with it, please help me with this. -thamks
How to make touch screen controls stay in place
Make your touch screen control node a child of player. (i.e. attached to the same parent as your Camera2D).
You could probably use a CanvasLayerNode and put your touch screen controls as children of that canvaslayernode
Peace As long as you want the camera to always stay centered on the player, this will work. If you ever need the camera to be somewhere else, you would need to do something more complicated to manage the camera. e.g. some side-scroller games will have the camera lag behind the player by a second or so.
It might be better to make the UI touch controls a child of the camera, rather than the player. Then the ui will stay in sync with the camera, even if you move the camera off the player.