Question by
Mylmyzan · Apr 21, 2020 at 08:35 PM ·
collisiontriggerparticlesystem
Trigger confirmation between particle & gameobject
Hello,
Whenever my player gets into a particle effect, a force is applied to it.
However, I only managed this through collisions :
void OnParticleCollision()
{
rigidbody2d.AddForce(Vector2.up *1000, ForceMode2D.Impulse);
}
But I don't want my particles to collide with the player, I just want a trigger. I've tried but failed to find a settings that would enable me to get something like:
void OnParticleTrigger()
{
rigidbody2d.AddForce(Vector2.up *1000, ForceMode2D.Impulse);
}
What am I missing? I always fail to trigger the "OnParticleTrigger". I've tried with an additional collider with a trigger on my player gameobject, with everything at "Callback" at Particle System > Triggers, by dealing with this from a script attached to the particle, etc...
Regards.
Comment