- Home /
How to spawn particles from a part of a terrain?
I need to simulate snow dust which is moving on a part of the terrain around the player. Therefor I'd like to spawn snow dust particles directly on the terrain (be it vertices, edges or faces) and blow them with a wind zone. To limit the selection one might be able to use a custom shape (like a sphere). However using only the editor this seems impossible. I tried sticking my nose into the scripting reference, but I don't see how to set a shape (specifically a mesh) for the particle system via scripts.
As much as I want to understand this question, I cannot.
What do you mean by : spawn snow dust particles directly on the terrain (be it vertices, edges or faces)
Again, what does this mean : To limit the selection
Using the legacy particle system, you can use a mesh emitter. I have never used the shuriken system so cannot speak about that.
Can you please elaborate on your question, it really is confusing and unclear.
True, in the editor you can set a shape for the particles system to spawn particles from. This works in the Shuriken system too. However I can't choose a terrain to emit from. Also I don't want to emit particles from all of the terrain. Just from vertices/edges/faces near to the player. To deter$$anonymous$$e which vertices/edges/faces should be used for the emission, I had the idea of using some shape which intersects with the terrain. All vertices/edges/faces of the terrain which are inside the shape then are used for the emission. Now I'd only have to copy the position of the player each frame. So I get my particles to spawn "directly on a limited selection of vertices/edges/faces of the terrain" around the player. And so I wouldn't have to use approximations like using only primitive objects or meshes which have nothing to do with the terrain as emitters. The overall question now is: How do I get the particles to spawn how I want them to spawn. (Around the player on the terrain) And should anybody think my idea might be worth something: How do I set the shape for the particle system? (Of course I need to find out how to create a mesh by using the intersection, but I suppose that's another question. Also if there is no possibility to set a custom mesh via scripting, I suppose this isn't relevant.) I hope I could clarify my question a bit. I wanted to keep it short but possibly some information was lost on the way.
it could be better solution to create a several empty game objects around your character then locate them on terrain surface every frame by using raycasting, and then add particle system to them with animation