- Home /
"Draw" a mesh on a Terrain (Like SimCity 5 Street System)
Hello everybody.
So i try to make a simcity clon for myself and i'm stuck at the start smiles
I just don't get an idea how to build a street or somthing else with the mouse on a terrain.
My idea was that i create a mesh at left mouse button down event and draw in realtime the mesh on a terrain while the mouse button is pressed.
so is this possible? when yes, how? what is when i have 2 streets? how can i connect them ? it is to difficult?
Thanks for answers
Answer by Itinerant · Apr 24, 2013 at 06:54 PM
It is possible, you can check out EasyRoads3D for an implementation of creating a mesh road, though note that this is done in the editor, rather than at runtime. As for how exactly, I'd suggest reading through their code and how they do it. It's not going to be super easy, though. If this is your first project in Unity, you may want to begin with something simpler.
I don't want to pay for this idea. And i don't think that the EasyRoad Projekt is a readable code.
This looks pretty cool. If I build a racing game I am certainly going to use this.
Answer by DSebJ · Apr 24, 2013 at 11:39 PM
Use a grid system & start with a flat surface. Select which squares in the grid are going to be connected and then turn them in to a road.
I've not played Sim City for a long time, but the original one was simplified by not worrying about a height map for the actual city construction.