Tiled Parallax with unity

How is parallax handled within tiled, will I need to use my own Scripts for the parallax to work with in unity ?

1 Like

In Tiled, parallax is a scale factor on the offset due to camera position, the default value is 1.0 (the layer moves exactly as you’d expect relative to the camera).

I don’t use Unity so I can’t help with specifics, but generally yes, you will need to use your own game code to offset the layers based on the camera position and parallax scale factors, because Unity lacks a dedicated parallax feature as far as I know. There are tutorials for setting parallax up, though.

1 Like

ah is see, I have my own parallax script. is the parallax in Tiled ever exposed to be used for scripts within unity? so the parallax X and Y in tiled is shown in a script in unity that I can use for reference with my own script ? or is the parallax property only shown in tiled ?

1 Like

That all depends on the loader you’re using to get your Tiled maps into Unity. SuperTiled2Unity, the most common one, includes the parallax factors with the prefabs it creates, but I don’t use Unity so I don’t know how you would access them.

3 Likes

I am using supertiled2Unity, just check the prefab and it does show the parallax X and Y that I can use for my script. thank you for the help and fast response !

3 Likes