Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Danovist_ |
I have a scene UI.tscn, which uses a canvas layer as a main node where I was able to code a crude life bar.
Now I would like to make a minimap. I thought about using a container and a viewport container in order to only show part of a sprite (which would become my map, then I could move the sprite with the player character in order to “Update” the minimap)
I started by using this setup: Godot scene setup - Imgur.
Where the control node has a child container, then a viewport container and finally a sprite as a child.
However, when I test it with the sprite outside of any of the containers ( Imgur: The magic of the Internet ) it still shows completely in the game ( Imgur: The magic of the Internet ).
Can anyone help? Is it a completely false way a tackling the problem and I should use something else?
PS: I tried reading the other minimap questions, but they were speaking about using another camera i think? Being new to godot I did not understand much about the answers. Sorry about that.
EDIT: I found the answer and I would like to delete the question. It’s not approved yet so I you read this don’t approve it i guess?
For anyone wondering you need to use the scroll container node sorry for wasting your time.