Hello Guys, this is my first Post and i have a big Question
I habe a Plane… or a Cube… no lets say i have a Object… a Mash… this Mash has a Meterial and the Material is Green.
AND i have a Particle System that sprays to this Mash hat hit it.
not i want to make, that the Green Material turns slow to la Black material (like its burn)…
how do i handle this?
i hope you can help me =)
regards Blackhawk
Thanks, but i allready know this funktion…
MY problem is now the line i have to write or the settings i have to make that my mash loked burned…
for example i have a bit big plane with ONE mig material…the plane can be a green grass field.
and my particlesystem is a flame thrower
tha the matirial has to chance at this places, where tha flames touch the plane
That’s tricky. OnParticleCollision() doesn’t give you any information about where the particle was when it collided. You would have to check through all the particles in the system, and see which ones are near your mesh.
Actually changing the colour would probably best be done by modifying vertex colours in your mesh.
can you please whrite me an example?.. a little example because i actualy have now idea what you talking about… or how to manage this problem.
Okay Hello once again in a new section =)
i want to explain my Problem again.
I have a ParticleSystem and i use it like a Sprayer. Like a Water-Gun oder a FlameThrower…
AND i habe a Big Big Big Plane. When i hit this plane with my ParticlySprayer tha i want to change the Material (or the Texture or what ever i have to chance tha it works) only at THIS plase… like a Bullit hole but more smooth.
What i want exaktly to do is changing THIS
http://img196.imageshack.us/img196/8407/pict0001fd.jpg
To THIS
http://img210.imageshack.us/img210/4265/002enteisung11.jpg
on the most realistc way… that means if tha sprayray is near by the ice it will disappear fast
if the sprayer is far away it will disapear slow (maybe i can manage THIS with the engery property of the particles)
can really nobody help me?
This is a custom problem and there are a number of ways to go about trying to solve it. I think no one has helped you yet because you have not provided any information for what you have tried yourself so far. No one here is going to script the whole thing for you, but if you ask more specific questions maybe we can help you out with more specific answers.
okay, what have i tryed before…:
function OnParticleCollision (object : GameObject)
{
if (Object == "Plane")
{
Object.renderer.material.color.a -= Painter.particleEmitter.minSize;
}
}
the color Change slow and nice… but the color of the whole big plane is chancing. and i want to make something like grafiti-Spraying
i think this i some new kind of question… mybe you can help me now a lil bit more
So… i have just createt a Terrain and thair it works… that means…
If i have a Ground Texture, i can brush over with another Texture… i want to do that with my own objects at runtime.
is that clear enougth
You are looking at the problem from the wrong point of view. Particles are generally used to create an effect, they are mostly for visuals. Just raycast from your spray tool/weapon to check for a hit and then work on the object hit texture.
You might want to look at this post and adapt the script for your needs http://forum.unity3d.com/viewtopic.php?t=53657&highlight=modify+texture .