1
\$\begingroup\$

I have a SpriteRenderer that should represent a never-ending tile floor. The idea is that we have a factory floor in an idle game that can grow forever.

I got two components:

  1. Top part consisting of a wall, and a floor part that remains fixed and should connect to the endless floor.
  2. An endless floor that should tile from the bottom and only downwards.

Top part

Roughly where the brighter floor patch begins, this is where the endless floor starts, the problem is that when I set the Sprite to "Tiled" & "Continuos" the tiling actually extends at the top instead of at the bottom and causes this visual annoyance where some of the tiles look cut-off:

Annoying tiling

I set the Sprite's pivot to be Top-Center, when it was the default center it was even worse as the tiling would go both ways.

Any idea how to resolve this so the top part of the endless floor remains fixed and only the bottom part is being extended & tiled?

Thanks!

\$\endgroup\$

1 Answer 1

2
\$\begingroup\$

In an image editor, mirror your tiling texture vertically.

In your scene, select your tiling floor sprite and negate its y scale.

These two flips together cancel out, so the displayed pattern is the same as you had before. But now the "top" of the sprite according to Unity is the bottom, and vice versa, so the direction in which the tiling extends has been reversed as desired.

\$\endgroup\$
1
  • \$\begingroup\$ Fantastic. This works perfectly. Thank you! \$\endgroup\$
    – Dror
    Jun 13 at 12:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .