- Home /
Check if a pre-determinated area has particles in it?
I'm having trouble getting my head around this. I have enemy bullets, and I want to check if they are within an area around the player to activate effects, like bonuses. I have colliders and triggers set on them, and tried with collider enters and stays and exists and that stuff, couldn't get it to work. Then I tried to figure out on particle collision, but I've been unable to get my head to wrap around it. What would be an efficient way of checking, if in an area around my player there are particles(of a specific kind)?
Hi, the OnTriggerEnter/Stay/Leave should work, I mean, it's made for this kind of problem; The ParticleSystem way may be less appropriate as it was not designed for this (except for some edges cases maybe).
It's difficult to tell exactly what's wrong with the info you gave but here is what I do in this kind of situation: I create a new project and explore this Unity functionality/feature in this small project until I understand it, starting with the smallest example and ramping up until I get to the same kind of problem that blocs me. It may seem that it takes some time to do so but the knowledge gained is stronger so it's usually a good investment of time :-) (and it's easier to share a test project in case you are still stuck, or use it as a repro case project in case it's a Unity bug :-)