Sorry if this question is so silly, but I really have looked hard for an answer and can't find one.
I am trying to make a particle system that has the same x width and z lenght of my terrain, and so what I thought to do was through code get those dimensions and then through code change my particle systems range in the x and z direction to match the terrain's dimensions.
So I set my landscape as a variable in the following way
but can't find out how to access the dimensions. Is there a way? Also is my approach even a logical one, or is there an easier way. Thank you so much
Add below the var go line in your script:
That'll give you a vector3 in world units
Documented here: http://unity3d.com/support/documentation/ScriptReference/TerrainData-size.html http://unity3d.com/support/documentation/ScriptReference/TerrainData.html http://unity3d.com/support/documentation/ScriptReference/Terrain.html
answered Jun 20 '10 at 12:45 AM