- Home /
How to make an parallax starfield background
I want to make an parallax starfield background for my 2d game. I want to be something like the starfield in this flash game: http://www.maxgames.com/play/flashtrek.html My game is in 2D and i'm using an orthographic camera which I will probably need to switch to perspective. So how do I go about doing this? thanks in advance
Answer by seandanger · Jul 04, 2014 at 06:19 AM
This looks like a pretty good tutorial on how to achieve the effect -- without switching your camera to perspective. The short answer is that you manually scroll the farthest away elements at a rate that is slower than the elements closest to the camera. See the link for the details.
http://pixelnest.io/tutorials/2d-game-unity/parallax-scrolling/
Answer by LaireonGames · Oct 01, 2015 at 09:42 PM
Bit of an old thread and I am shamelessly pushing our own work but if you willing to part with $2.5 to $10 you can check out our backgrounds with built in parrallax effects:
https://www.assetstore.unity3d.com/en/#!/content/44641
Otherwise its really simple. All you really need to do is use a perspective camera (to give depth) and place your sprites at different distances from the camera. Then as your camera moves/zooms you will see a nice parrallax effect.
Your answer
Follow this Question
Related Questions
Parallax Lag issue... 0 Answers
What's the most efficient method of implementing an infinite parallax background? 0 Answers
What's the best way to do a parallax? 0 Answers
2D Parallax Background 4 Answers