Hello,
I am trying to make Parallax 2D connected to Player movement, but currently in Parallax2D component I have only two options of parallax reaction: Camera and Cursor.
https://www.dropbox.com/s/mmzkg6rukacjla1/parallax.PNG?dl=0
Is there any way to make parallax react on Player movement?
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Not currently, but as the component is not referred to by the rest of AC's scripts, it could be duplicated and modified to suit your needs, with the Player's position being gotten with:
Is the camera supposed to be stationary during this time? I can't picture how this would be used in this way, though if you can share some screens/details of the situation that would help clarify things.
Yes.
I am thinking about two layers. Front and back. Front layer should be static and back layer should move according to player movements. Something like here in example video, but in this video back layer is static and middle and front layers are moving.
https://www.dropbox.com/s/mbe62p1wcemouk8/Parallax example.mp4?dl=0
AC = 1.73.8
Unity = 2020.3.12f1
It's subtle, but the parallax in the example video still looks to caused by the camera movement - the gameplay area is moving slightly.
I will, however, add the option for a Parallax 2D component to react to a specific GameObject (such as the Player) in the next release.
Thank you Chris!