Posted By: VAt
collision on the particles !! - 04/23/04 04:27
hi friends,
with ur heartiest help now i can create rain and other particle effects.But still there is one problem,"my rain is going through the rooms". How do i them to move into??
plezz help me.
Posted By: Julius
Re: collision on the particles !! - 04/23/04 07:14
one of the AUMs has a tutorial on that. it uses sprites instead of particles. to keep the blood from my entities going through the ground, i use content to check it the particle is in a solid.
hope this helps.
Julian
Posted By: Bird
Re: collision on the particles !! - 04/24/04 00:44
you also can do this with particles:
function not_in_house //function of your particle (my.function=not_in_house;)
{
if(content(my.x)==in_solid)
{
my.move=0;
my.function=0;//clear the particle
}
}
Posted By: mk_1
Re: collision on the particles !! - 04/25/04 09:58
well, no. Sometimes a particle is "too fast" and just moves through a wall. If it then checks for content it won't be solid but empty space.
This method works IF the particles are slow and the walls a thick.
Each time you create a particle, find it's velocity and do a trace in that direction. Store the z-component of that trace-vector in one of the particle skills (skill_a,skill_b). That way you are only doing one "slow" operation per particle.
When the particle gets to that height, then make it stop, splash, splat, explode, or whatever.
One thing I noticed, is that while this stops the particles, if you have streak (or maybe beam too, I don't know) turned on, the streaks will continue past the point where the particle stops.
One disadvantage with this system: it doesn't work on moving platforms. For the most part, it looks good though.
Posted By: Rigoletto
Re: collision on the particles !! - 06/10/04 02:39
Just an idea,
add some sprites to your particles and use them as reference.
Posted By: Yulor
Re: collision on the particles !! - 06/27/04 21:37
In addition.. you can also check to be on_solid, then trace to see if it is on a roof texture, then move it downwards diagonally so it slides off the normal of the roof, and if it hits an invisible block about 1 unit off the roof, it will start to fall again.....
Posted By: Bird
Re: collision on the particles !! - 06/29/04 12:23
that would be too slow
there are too much particles for a trace from each one to the floor.
And with on_solid you mean content_solid, right? i didn't find an on_solid in the manual.
But content_solid would be too slow to realise that the particle is on a block.
It's only for entitys with collision.
sorry

But the idea was nice