+1 vote

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)

in Engine by (69 points)

1 Answer

0 votes
Best answer

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?

by (7,190 points)
selected by

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.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.