Filtration of collisions of particles and bodies in a liquid medium

I created a functioning JavaScript game using the Box2d framework that LiquidFun provides (and efficiently injectable filtering). I understand how to filter using maskBits, categoryBits and groupIndices.

I have successfully created one particle, but it collides with all the fixtures. My hope is to filter out some of the fixtures so that the particle only collides with some lights. What tag is used to handle particle and instrument collisions and filtering?

LiquidFun update notes for 1.0.0 release states "Added option to invoke listener or filter for particle / instrument interaction or particle-to-particle interaction." However, I cannot find where this was done.

Looking through the source code b2ContactFilter

seemed appropriate, but it looks to handle collisions between two fixtures. Likewise, b2ParticleBodyContact

it seems quite pertinent, but I cannot determine how this should be implemented.

+3


source to share





All Articles