Okey, so I just made a terrain, set my main camera to orthographic and placed it directly above the terrain.
So I´m trying to figure out how to let the player add a “building” to my terrain, equal to any tower defense game. (No, I´m not going to make a tower defense game:) )
My first thought was to add a panel somewhere at the terrain, then create a “building” prefab that will be attached as a game object. When the player click the panel or whatever I just instantiate the “building” prefab through my script.
However, this seems like a solution that will eat my games performance and spit it out.
Well if your making pre-placed locations just spawn the prefab where the panel is when the user clicks it. You shouldn’t have any problems with performance by simple instantiating a few prefabs. If they can be placed anywhere do a raycast to get the location, and then you can use the hit normal to rotate the building to be aligned to the terrain if you need it.
Hey man, well, actually buildings can only be created on certain places. However, I do need to learn more about raycast, do you have any good tutorial on it?