In my Unity2d-platformer, I need background to follow the character, so I just attach it. And when character turn left from right (or right-to-left), background turn too.
How can I make my background constant?
In my Unity2d-platformer, I need background to follow the character, so I just attach it. And when character turn left from right (or right-to-left), background turn too.
How can I make my background constant?
Do not attach it to the character. An easy option would just be to have a script on the background that has it match the X position of the player transform.
Make a script that follows the cameras position or/and just make it a child of the camera depending on what you want to achieve. The script solution has the benefit of making it possible to make small adjustments depending on which direction the player is running.
I think you're looking for "Parallax Scrolling" http://unity3d.com/learn/tutorials/modules/beginner/live-training-archive/2d-scrolling-backgrounds