Is there any code sample for particle collision with box2d using Paticle Design?
Trying some fluid collision, or a way to use Particles from Particle plist to interact with accelerometer, or a moving object, making it liquid.
Box2d + Particle Design?
(8 posts) (5 voices)-
Posted 1 year ago #
-
i would also like to be able to have particles interact with box2d objects, any way to?
Posted 1 year ago # -
bump
Posted 1 year ago # -
Nope.
You can create a class that supers a CCParticleSystem or CCPointParticleSystem and take manual control over the particles.
You'd need to rewrite either one of them to use a b2Body for the particle's position and speed, direction, etc. Then when you're drawing apply the texture over the particle' body position. You'd also have to monitor the particle's life, and other properties.
There may be a simpler way, but I haven't found anything. A couple people made threads about this before and mentioned they did a similar thing.
Good luck!
-robodude666
Posted 1 year ago # -
any links?
Posted 1 year ago # -
None off the top of my head.
There's a search bar at the top, go nuts. If I recall correctly, none of the threads for particles + box2d have any code examples.. You'll have to roll your own solution.
Posted 1 year ago # -
Here is an article to provide control over particles with b2Body's:
Posted 8 months ago # -
For those of you who want to know how to check the existence of box2d objects at a given point, you may want to consider QueryCallBack.
Please search the word in this forum and you will get some posts about it.Posted 8 months ago #
Reply
You must log in to post.