Hi!
I’m using the script I found here:
It works great when using in one “frame/view”, but when I use it together with cinemachine and swap frame (move forward in my game), the layers that uses parallax have been moving while I’m in the first scene (despite disabling the gameobjects of all frames I’m currently not in). I tried to reset position and stuff but can’t get it to work.
The problem goes away if I put 1 main camera in each frame as I saw on a youtube tutorial, and there’s no displacement, but it makes my dash function that uses the mouse position for direciton want to dash towards the main camera of the first scene, which isn’t something I want…
Some ideas I’ve got to fix it but can’t implement:
- Only let the active layer use parallax
- Reset backgrounds to original position when entering Trigger Action (tried this with FindObjectTag to no avail)
- Put backgrounds at an offset to the distance I’ve moved in 1 screen (prefer not to use this)
I use Cinemachine confiner and trigger action script to change the view, and the displacement is exactly the amount the camera changes from screen to screen, in x position. Hope I’m making sense… Would appreciate any help!
Thanks!