Search Unity

grassonmesh

Discussion in 'Scripting' started by slashdotray, Apr 2, 2007.

  1. slashdotray

    slashdotray

    Joined:
    Dec 3, 2006
    Posts:
    77
    hi,

    i just try to manipulate the grassonmeshgenerator from the naturepack.
    is there a possiblity to destroy a generated grass-mesh when i fire on it or cut it with another weapon?

    thx
     
  2. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    You could use the hitpoint to lookup the grass patch index. Similar to how the visible grass patches are found. Then flag it as destroyed with a new variable, destroy it and make sure the patch generation code doesnt create patches that are marked destroyed.

    It would probably look better to adjust the density of the grass at the location though