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?