Need help with strategy terrain.

Hey guys, got a question here ill be glad if you can help. Im making a strategy game like Stronghold 2.I want to create a sort of terrain that lets you build, instantiate prefabs on it and doesnt instantiate prefabs when the terrain looks is uneven just like Stronghold 2. Im not sure whether I have to create a voxel terrain which i really dont know how to do. Can someone help please. Thanks

You shouldn’t need a voxel terrain for a traditional strategy game, that would be more for something like if you were making a 3d version of Worms.

You need a ghost building that follows the cursor, can turn red or green, and while it is moving you need to check every terrain vertex in the the building’s footprint against its neighbors and if the slope is greater than a certain point, or the overall slope corner-to-corner is above a certain value, then you can’t build, if all of them are less, then you can build.

[edit] Actually, you don’t need to compare verts directly, if your terrain will not change during the game. I’ve been working on my own dynamic terrain and haven’t actually used Unity’s terrains, but they give you a lot of useful functions to work with. Check this one out:

It’s going to be a lot of scripting to get the building placement effects fully working the way you want and you’re probably not going to get someone to write it for you on this site, so crack open the docs and get to reading.