The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates.

godotengine.org | Twitter

+1 vote

I'm trying to add a visual effect where the background of a menu has a constantly moving grid of scrolling lines, see here:
https://youtu.be/dyx4VIVouGQ?t=87

(note: I only want to do the grid of thin lines, not the vignette nor the thick vertical line that moves horizontally)
How would I go about doing this? I considered using an animated sprite with frames set to be each pixel movement of the grid, and alternatively physically moving a grid image and resetting its position before it can go completely offscreen, but I wanted to make sure if there are any better ways to achieve this first.

Godot version 3.2.3.stable
in Engine by (31 points)

1 Answer

0 votes

You can use a shader to scroll the image. https://godotshaders.com/shader/scrolling-background/

by (8,550 points)

The link you provided wasn't something I fully understood, but I did do some research about shaders and got the exact sort of effect I was looking for. Thanks!

(FYI for those reading this thread later: I followed a guide at https://generalistprogrammer.com/godot/godot-infinite-scrolling-background-how-to/)

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 Frequently asked questions and 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 [email protected] with your username.