- Home /
 
Is there a way to add mesh, being modified during play mode, to particle component to emit particles from it?
Hello, I am trying to make something like a sandman- a human, that has sand for a body. For that purpose I would like to add particle system to drop sand particles around his body. But the problem is- my character has animations and I can only apply static default mesh for mesh shape. Is there a way to dynamically modify the mesh that I want particles to emit from?
Note: the only way of doing it that I can think of would be using a few particle systems and parenting them to the bones. But is that the only way?
Answer by Graphics_Dev · Mar 13, 2016 at 08:58 PM
Get Unity 5.3 to use skinned meshes.
http://blogs.unity3d.com/2015/12/08/unity-5-3-all-new-features-and-more-platforms/
Let me know if this helps ;)
Thank you, it helped;)
P.S. Sorry for a late responce:D
Answer by newyellow · Mar 17, 2016 at 10:27 PM
Unity 5.3 has skinned meshes now (versions before 5.3.3 has bug)
 
 If you really want to modify it through script, you can do this:
 
     public SkinnedMeshRenderer _skinedMesh;
     Mesh _mesh;
 
     void Start () {
         _mesh = new Mesh ();
     }
     
     void Update () {
         _skinedMesh.BakeMesh (_mesh);
 
         // here you can get vertex points
         Vector3[] vertices = _mesh.vertices;
     }
 
               
 But accessing vertices of a mesh is very slow. If you just want to emit particles, use Unity 5.3's feature is much faster. 
Your answer