particleDesigner collision detection

Hi guys,

Please give a hint.

I am creating particle effects like this (read more here https://coronalabs.com/blog/2014/03/25/tutorial-using-particle-designer-in-corona/)

local particleDesigner = require( "particleDesigner" ) local emitter = particleDesigner.newEmitter( "fire.json" ) emitter.x = display.contentCenterX emitter.y = display.contentCenterY

How can I detect player collision ( dynamic body ) with emitter (fire for example)?

Tnx!!

GG

Hi @gogigoranic8,

The emitter engine is not truly related to the physics engine, so you can’t directly detect collisions with particles from an emitter. If you have an approximate “field of the fire” which you can consider would be where the player would touch it, you can make an invisible physical sensor body and detect collision with that.

Does this help you or not?

Brent

Hi Brent,

I assume I could make another body/shape for collison purposes.

But that will not be 100% precise, and would require some testing/shape adapting…

Thanks.
G

How much does your fire plume vary? You could attempt to render the fire using LiquidFun particles, which are physics-based, but it might not be as “pretty” as one done with normal particle emitters.

I will try first with basic triangle, and see what will I get.
It plums 1/4 - 1/3 of screenHeight…

Hi @gogigoranic8,

The emitter engine is not truly related to the physics engine, so you can’t directly detect collisions with particles from an emitter. If you have an approximate “field of the fire” which you can consider would be where the player would touch it, you can make an invisible physical sensor body and detect collision with that.

Does this help you or not?

Brent

Hi Brent,

I assume I could make another body/shape for collison purposes.

But that will not be 100% precise, and would require some testing/shape adapting…

Thanks.
G

How much does your fire plume vary? You could attempt to render the fire using LiquidFun particles, which are physics-based, but it might not be as “pretty” as one done with normal particle emitters.

I will try first with basic triangle, and see what will I get.
It plums 1/4 - 1/3 of screenHeight…