Particle System and Radial Gravity

(Quick apologies if this is repeated anywhere - I can’t find any information pertaining to this.)

Are you able to have a particle system with radial gravity? I understand radial gravity can be accomplished with touch joints for normal dynamic bodies, but is there anything similar for particle systems?

I see the Emitter has radialAcceleration too, but I’m still at a loss when it comes to bringing something similar to particle systems.

Let me know if you’d like more details. Thanks!

I’m not 100% sure what you meant, so I made a video exploring what I thought you might mean.  Whatever the case, this video will lead you to a free tool to explore the possibilities.

https://www.youtube.com/watch?v=5ckGqOqR3Rk&feature=youtu.be

Watch video above and start here:  https://github.com/roaminggamer

More links:

Thanks roaminggamer! Sadly, I’m not talking about the Emitter Particles. I need the Particle System behavior since it has physics.
 
I’m aiming to simulate water around a planet like this video shows - except in 2D since we’re in Corona of course haha. (Forgive me, I cannot figure out how to embed this video haha.)
 
There’s some corona documentation about radial gravity here, but it only works for dynamic bodies and not for Particle Systems - or at least I can’t figure out how to make it work for Particle Systems.
 
Thanks for the help! I wasn’t expecting such a quick reply haha.

If you have found a way to implement this since your post I would be interested to hear.

I applied radial gravity with joints in my last game.  But I don’t see how to do it  with particles.

Perhaps by applying velocities when the particles are in particular regions. But that seems very messy.

Unfortunately I have not found a way to implement this yet. I actually tried to do the ‘apply-velocities within regions’ method, and ran into some unexpected behavior. I posted about it here. There seems to be a bug, and the ticket (#13244439) I’ve submitted has been ‘in-progress’ since 3/21/18

When I do find a working method, then I’ll definitely post about it here and on the other post (linked above).

Thankfully, the physics engine that Corona uses for particle physics, LiquidFun, has API for this type of behavior via LiquidFun’s QueryRegion method. (LiquidFun’s particle system API documentation can be found here.) So Corona only has to expose that API, and then we should be good to go.

Hopefully Corona will expose all of LiquidFun’s particle system API. Unfortunately until then, I’ve had to move my development outside of Corona.

Build 2018.3278 has fixed the bug that I described in the post linked above.

andrake12, since that bug if fixed, I’m going to try that method of “applying velocities when the particles are in particular regions” and see what kind of performance we get vs how messy it is. My impression is that there’s going to be some issues with it, but we’ll see. (As for now, if trying that method isn’t fruitful, then I’ll have to keep my development outside of Corona.)

Posted feature request here.

I’m not 100% sure what you meant, so I made a video exploring what I thought you might mean.  Whatever the case, this video will lead you to a free tool to explore the possibilities.

https://www.youtube.com/watch?v=5ckGqOqR3Rk&feature=youtu.be

Watch video above and start here:  https://github.com/roaminggamer

More links:

Thanks roaminggamer! Sadly, I’m not talking about the Emitter Particles. I need the Particle System behavior since it has physics.
 
I’m aiming to simulate water around a planet like this video shows - except in 2D since we’re in Corona of course haha. (Forgive me, I cannot figure out how to embed this video haha.)
 
There’s some corona documentation about radial gravity here, but it only works for dynamic bodies and not for Particle Systems - or at least I can’t figure out how to make it work for Particle Systems.
 
Thanks for the help! I wasn’t expecting such a quick reply haha.

If you have found a way to implement this since your post I would be interested to hear.

I applied radial gravity with joints in my last game.  But I don’t see how to do it  with particles.

Perhaps by applying velocities when the particles are in particular regions. But that seems very messy.

Unfortunately I have not found a way to implement this yet. I actually tried to do the ‘apply-velocities within regions’ method, and ran into some unexpected behavior. I posted about it here. There seems to be a bug, and the ticket (#13244439) I’ve submitted has been ‘in-progress’ since 3/21/18

When I do find a working method, then I’ll definitely post about it here and on the other post (linked above).

Thankfully, the physics engine that Corona uses for particle physics, LiquidFun, has API for this type of behavior via LiquidFun’s QueryRegion method. (LiquidFun’s particle system API documentation can be found here.) So Corona only has to expose that API, and then we should be good to go.

Hopefully Corona will expose all of LiquidFun’s particle system API. Unfortunately until then, I’ve had to move my development outside of Corona.

Build 2018.3278 has fixed the bug that I described in the post linked above.

andrake12, since that bug if fixed, I’m going to try that method of “applying velocities when the particles are in particular regions” and see what kind of performance we get vs how messy it is. My impression is that there’s going to be some issues with it, but we’ll see. (As for now, if trying that method isn’t fruitful, then I’ll have to keep my development outside of Corona.)

Posted feature request here.