• Godot Help
  • "Follow Viewport" works in the opposite way

I'm not sure if this is a universal bug with CanvasLayer (2D) or just a quirk of my own projects, but when the property "follow viewport" of a canvas layer is disabled in the editor, the layer follows the camera, and when it is enabled, the camera can pan around the layer as if the layer was a static sprite.

Maybe this should be reported as a bug? I'd like to know if I'm missing something though

  • Hey there. The point of CanvasLayer is to draw 2D elements on the screen regardless of the Camera movement. For example, a health bar or ammo counter HUD on the top that is always in the same place. follow_viewport_enable is by default false which is how most people would use the node (e.g. having the UI/HUD stay on the top of the screen in one place). Setting that property to true is not common, it would be used for things like parallax effects or other psuedo-3D types of movement.

Hey there. The point of CanvasLayer is to draw 2D elements on the screen regardless of the Camera movement. For example, a health bar or ammo counter HUD on the top that is always in the same place. follow_viewport_enable is by default false which is how most people would use the node (e.g. having the UI/HUD stay on the top of the screen in one place). Setting that property to true is not common, it would be used for things like parallax effects or other psuedo-3D types of movement.