How can I have Unity display the correct tiles based on their surrounding tiles (ie corners)
I'm relatively new to Unity, and I don't want to reinvent the wheel, so I figured I'd ask here.
I'm currently building a randomly generated, 2D, top-down game using Perlin noise for the RNG. At each world coordinate (x, y) the Perlin noise returns a "height" value (z) that I can use to display the correct type of tile (grass, dirt, sand, ocean, etc).
My next step is to make the tiles seamlessly blend into each other, instead of having a hard line between them. I'd like it to look like the middle section of this image.
I know Unity has the 9-slice feature, but is that something that can be handled grammatically using C#? Or can that only be used in drawing manually? Ideally, I was hoping Unity had something that worked similar to this feature in Tiled.
Or maybe 9-slice isn't even the answer, I'm not all that familiar with it.
Any help is much appreciated, I've been stuck on this for a few days now.
Thanks!
ps. I'm using the Liberated Pixel Cup (LPC) base assets.
Answer by Dave-Carlile · Apr 07, 2016 at 08:41 PM
quill18creates has a Youtube channel where he is doing a tutorial on creating a base building game in Unity. He goes through doing tile transitions and such. Don't recall which episode (he's up to 36 or so) but it should be fairly simple to find.
Your answer
Follow this Question
Related Questions
Display pictures in assets folder in random order 0 Answers
Need a Raycast2d to point where my ship is looking 0 Answers
How to make headlight effects on a sprite? (Increasing emission of sprite material) 0 Answers
Sprites moving (shaking) during animation while they should not 1 Answer
Sprite loses quality when imported into unity. How to fix it? 0 Answers