Hello.
I have a Player scene that is set up like this:
KinematicBody2D
AnimatedSprite
CollisionShape2D
Camera2D
CanvasLayer
- PopupDialog
- - ColorRect
- - RichTextLabel
The PopupDialog and ColorRect are set right above my KinematicBody2D and I have some code that runs popup() and displays the PopupDialog box. The thing is, it shows up in the right hand corner ( 0,0 I guess) and stays there. If I click on Enable for Follow Viewport, it shows up where I want it to, but it's glued to the viewport and follows the background.
What I want to happen is the PopupDialog to follow the player around above their head when it displays. Do I have to update its position in code or is there a button or knob I'm missing in the way it's set up? Is this possible with CanvasLayer (as I want dialogue to appear over all elements). Can someone help point me in the right direction?
I've tried updating the position of the popupdialog to match the kinematicbody2d within process(delta) but it still doesn't appear to work.