1 (edited by philzmz 2018-11-03 05:23:46)

Topic: Generating buildings in specific areas ???

Hi
I want to generate buildings on a terrain, but not on the whole terrain which is very large, only in specific places (eg industrial  areas).
So generate a 1st (large) terrain and then the others, smaller, with the buildings, without texture on the terrain.
My concern is that all the generated terrains (the large one and the smallers with the buildings) are located in the Unity world space in 0,0,0 and I have to put them back manually at their right place.
Any idea to generate them in the right place, or move them in an easier way ?
The ability to define several zones where buildings (or other objects like trees...) have to be generated would be great !
Any help welcome !

Re: Generating buildings in specific areas ???

Hello.

Use RealWorldTerrainContainer.GetWorldPosition to convert the coordinates of the top-left corner of the smaller terrain to Unity World Position.
http://infinity-code.com/doxygen/real-w … cb61d8bbdb
Next you just need to set this position.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.