- So now we have these markers in place to identify…where blocked tiles are supposed to be.…But of course, nothing is lined up properly.…In fact, it's so off alignment that when you…look at this in the Scene View,…and zoomed out a little bit,…nothing even matches up.…There's so much stuff going on around this…you can tell it's not just a simple alignment issue…because this pattern of white area does not match up…with any pattern visible on the blue.…So we need to figure out exactly what's going on here…and how to get this stuff lined up.…

Fortunately, I've got a pretty good idea…of where to go now.…So let's go into our Terrain Manager and fix some code.…What I'm going to point out is a difference between…how the tiles are initially generated and offset…versus how we draw them.…So first off, I'm going to go into our Start.…Our Start method has an offset variable…and you can see that every time we're creating…a new transform, we're offsetting its position…by half of the tiles.…

We're going to do this again…up inside of the Redraw Map.…

Resume Transcript Auto-Scroll

Author

Released

9/2/2015

Learn how to procedurally generate infinite 2D terrain—including biomes with Perlin noise, cities, and even interior structures—with Unity 5. Dan Violet Sagmiller shows how to generate terrain in real time, blend different terrain types, animate complex surfaces such as water, and use serialization techniques to load and save content quickly.