- Home /
Scrolling and Looping 2D Background Image
Alright, I'm a bit of a beginner here with unity, and basically I'm working on a sidescrolling game, and what I'm trying to figure out is how to get a 2D background image to scroll around as the character moves, and loop the end of the image to the beginning of the image when it needs to. I'm just looking for the basics of how to make this work, and then I can modify my scripts to get this to work if I need to.
What I've done to get a 2D background image so far is just creating a 2nd camera to display the image in the background by setting it to have a culling mask for only the background image. I can change my method of displaying the background image to get the image scrolling if need be.
use a quad, set texture to wrap mode and animate the uvs, throw in a mod operator to avoid having your uvs stray too far from 0 to 1
That's kind of cheating, but displays a basic knowledge of search functions that most people who ask questions on this site lack...
Thanks, that's really helpful. I did a quick search before I asked the question but didn't turn up anything useful. Guess I missed something, thanks!
Your answer
Follow this Question
Related Questions
2D Background Generator 1 Answer
Equally Distributing Light On a Quad Object 2D 2 Answers
2d backgrounds - filling all screen sizes 1 Answer
Animated background in multiple scenes 0 Answers
parallax scrolling background 2 Answers