Topic was automatically imported from the old Question2Answer platform.
Asked By
TheNewGrant
Hello! I’m trying to make a pausing system in my game but I’m having trouble with the popup appearing in the same place every time in the global environment while not following the camera or player. I have the popup scene as the child of the camera2d, and that is a child of the moving character. Does anyone know why the popup isn’t following the camera? (I’ve also tried using CanvasLayers to solve this but I’m having trouble making it work - it hasn’t made a difference to the outcome)
Popups just aren’t meant to follow the camera. I’m not really sure why it’s that way, but it is. I was able to get the popup to display on screen by putting it under a CanvasLayer. Can you provide more information about how you used CanvasLayers?
Turns out I was using CanvasLayers wrong. The simplicity of it confused me so I messed with the settings too much even though it would have been better if I left it alone. My scene tree to popup was
Player (KinematicBody2D)
Camera2D
CanvasLayer
PopupMenu
In CanvasLayer I had Follow Viewport enabled. That was what was wrong. I just needed to leave all the default settings alone.
Thanks for the info about popups. Now I know how they work and a bit on how CanvasLayers work.