Collision particle

Hi,

I would like to ask if it is possible to detect a collision of particle to an object? I suppose it should be possible but I’m unable to set it up.

Thank you for your help

1 Like

As far as I know, for performance reasons particles created by Defold’s particle system are not actual physical objects. Anyone who sees this and knows otherwise, feel free to correct me, I’m not 100% sure on this one.

If you want particles that can interact with the rest of the world, you’ll want to create a simple ‘particle’ game object with a small sprite, collider, and a script to handle particle color, fading, etc.

Would you mind sharing a screenshot of your setup?

2 Likes

Lukas is correct. Particles are not part of the Box2D physics.

2 Likes

My set up is basically the Magic Link tutorial + added particlefx to the box.

I would like to make a chain reaction game. One solution would be to iterate over the array of elements to find neighbours and act, but detecting the collision of particles would be much better I think.

This is my first tutorial/game so any kind of help would be really appreciate.

@sicher has written the Magic Linker tutorial and knows the code inside out. He should be able to provide you with some assistance.

Thank you @britzl, but my problem is not related to the Magic Linker tutorial. I just use this tutorial as base for my tests.

My problem is detecting sprite collision with an go.

You can’t detect sprite collisions, you need to add a collision component with one or more collision shapes that cover the sprite and detect collisions between the collision shapes. The Physics manual should describe this in detail.

3 Likes