- Home /
Background problem
Hi,
I want to make a background for a 2d game, I want it to be tiled all across the game, the camera is moving.. I have been thinking about it for a while but I didn't find anything, any help will be appreciated :)
Answer by robertbu · Mar 05, 2013 at 06:41 AM
I wanted to make you aware of an alternate solution to tiling: animating the material offset. You can make your background a child of the camera and rotate the material offset to match the camera movement to simulate a moving background. No messy moving of planes.
You use Material.SetTextureOffset() to change the offset over time. If you look at the script reference, there is a simple example that animates it over time. You would change the offset based on the position of the camera.
Your answer
Follow this Question
Related Questions
Stretching Background sprite 4 Answers
How do I get my tiles to overlap my Background sprite? 2D 1 Answer
2D Animation does not start 1 Answer
Change the background color attribute of a camera in C#? 2 Answers
Background Image as Orthographic 2D Game Background - and quick 2D parallaxing question 1 Answer