Forum rules - please read before posting.

Parallax 2D affecting player.

edited August 2018 in Technical Q&A
Hi!! I am a newbie here, and really enjoying AC. I have a little problem I hope you guys can help me with.

Basically, when applying the parallax effect, the player is affected by it and it moves with the camera as it was a layer of the stage, instead of the player itself. This means, when the player stops moving, but the camera is till following it, you will see the sprite sliding on the ground.

Did I miss anything?

Here is a video for more clarity:
https://www.youtube.com/watch?v=xL3xVBe9WDM&feature=youtu.be 

Comments

  • Welcome to the community, @Yoplay.

    Which versions of AC and Unity are you using, and where are you applying the Parallax2D component?

    When attached to a GameObject, it'll affect that object's position according to the camera position - so shouldn't be attached to characters nor anything the player can walk or or interact with.

    Going by your video, the only sprites that should feature this component should be the pots in the foreground - is this the case?  The player seems to shift by the same amount as them, so I'm wondering if he's also got it by accident.

    The included 2D Demo relies on the component for both foreground sprites (ParkForeground1) and background sprites (ParkBackground) - do you find the same issue when loading that up?

    The 2D Demo can be loaded via the top toolbar - just be sure to re-assign your own game's Managers (by double-clicking the Manager Package asset in your game's subfolder) once you're ready to switch back to your own scene.
  • Ugh!! My mistake! I did apply it to the wrong sprite. It is now fixed.

    Thanks for such quick reply and sorry I wasted your time! I hope my next question will be less stupid :smiley:
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.