- Home /
Problem with 2D parallax effect (flickering)
I am trying to create a parallax effect for some 2D layers and here is how it works: I get camera's x movement as deltaX
and move background object a bit less than deltaX
in every frame.
it works fine but I get a flickering artifact. I know I have to use LateUpdate()
. but the problem is the camera itself has a chasing effect which should be done using LateUpdate()
and I have to make sure that Parallax is calculated after the camera repositions so it should execute after LateUpdate()
. is there any way to achieve that? or is there a totally different workflow?
I found this link for now, i dont know if this is a same problem with us. http://digitalleaves.com/blog/2014/01/the-pains-of-being-a-floating-point-number/
Answer by Salazar · Sep 27, 2014 at 09:51 AM
I find a solution but its not same effect with that maintextureoffset method.
I instantiate planes when player moves in 2d. And delete when player go far from that plane.
I made a game named Crow in googleplay you can compare the game for performance vs effect.
Your answer
Follow this Question
Related Questions
trouble with getting the background to show past the midground in 2d parallax backgrounds 0 Answers
2D Parallax Background 4 Answers
Moving Background with translated images 1 Answer
How to create an infinite scrolling background in top down multi-directional shooters. 2 Answers
Problem with changing the direction of an Infinite scrolling background. 1 Answer