|
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
(comments are locked)
|
|
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
(comments are locked)
|
|
The general way of finding the "size" of an object is to get the renderer.bounds Not going to work for terrain though, it doesn't inherit Renderer
Jun 20 '10 at 12:56 AM
Mike 3
(comments are locked)
|
