Canvas layer not following view

Godot Version

4.2.2

Question

Howdy y’all I’m having an issue. I have a canvas layer set as its own layer that contains a sprite that has the controls for jump. I have a script on the canvas layer to toggle its visibility with a button press.
that all works just fine.

But for some reason the canvas layer will not follow the viewport. ive set follow view port to enabled and have it parented to the camera
what am I doing wrong?


Do not make the canvas layer as the parent of camera 2d. Move the canvas layer to the main scene maybe level_1 and disabled follow viewport

1 Like

Try disabling follow viewport and running it unparented.

Follow viewport means that if you treat the canvas layer as a separate viewport, the canvas layers’ viewport will follow the camera, thus making its contents appear static.

In reality you want the canvas layer to NOT follow the viewport so the position of its contents never change, thus giving the appearance of following the camera (although that isnt whats happening, because canvas layers are an entirely new layer on the screen. Think of it like adobe photoshop.)

1 Like

thanks this eventually lead me to figure out the problem.
it turns out with the way my camera is set up only stuff in the bottom right quadrant of the screen in the canvas layer will appear in the view port. its working now!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.