- Home /
Duplicate Question
Roads on City games
I am seriously confused. I've spent days wracking my brain trying to figure out how games like simcity have buildings and roads up and down hills! I can't seem to figure out a way of making a road rotate and follow the exact curvature of the surface it's on. Any help would be appreciated. Thank you!
I use unity script and if you could give me an example that would be great! :) Thank you
http://www.youtube.com/watch?v=3Rl$$anonymous$$f7Q8CY$$anonymous$$
Looks like this guy has some videos for a tutorial on doing what you're asking about.
It's inconceivable you could do this as a beginner programmer.
I'm a beginner coder, but I have a lot of experience using blender, so I just try and get support for making the scripts!
Simply buy one of the packages that does this, as Christian says.
Answer by ChristianLinnell · May 22, 2014 at 11:01 PM
Well, it depends a lot on what kind of effect you want.
Long story short, it's best not to think of it as a rotation!
Earlier Simcity games lay a grid over the terrain, and each square of that grid gets its own texture. If it's meant to be a road, then it gets the road texture. Doesn't matter if it's going uphill or downhill. There's no separate road object (though those squares will be flagged as roadway).
Newer games allow for much more detailed roading. One way you could do it would be to paint the texture onto your terrain. A better way would be to plan the road path, and build a mesh for the road based on that path and then throw a texture on it. It's actually not that hard to do.
If you want to try it yourself, Unity has good tutorial to get started with creating meshes at runtime: https://docs.unity3d.com/Documentation/Manual/Example-CreatingaBillboardPlane.html
If you don't, there are assets that you can buy to do the job for you, like Road Architect: https://www.assetstore.unity3d.com/en/#!/content/15739
Thanks. I think the procedural mesh generation would be best! Thank you :D
Answer by vvkkumar06 · May 23, 2014 at 12:23 AM
You can do this. If you want to save your time then I will recommend you to get some 3D models of street, buildings, bridges or road parts( if you want to build custom roads) or even you can get some models of cities then you can place your models in unity and start with it. Use blender to convert 3d models into fbx format. You can use following two websites to get free 3D good models.
http://tf3dm.com/3d-models/all
If you want look for more then go to google sketchup and download then you can convert these into fbx. But you need either google sketchup or some converter.
If you want to develop your own custom roads then you can use some road parts models and tools like blender to make awesome street.
Yeah, I'm pretty good at making 3d models, and I have plans for all the buildings, it's just making the objects snap to roads, and roads not overlap, and buildings not overlap, and curved roads, and making roads go up hills.... Roads are a pain in the butt.
You can create roads within few $$anonymous$$utes I can show you with video..
It's ok, I think I'll start with something more simple, like a sidescroller...
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Min, Max Rotation Help 2 Answers
How can i limit rotation in my script? 0 Answers
z axis doesn't follow the rotation of its object 3 Answers
Check angle 1 Answer