jit.phys.multiple as a flock system

simon.ben@free.fr's icon

Hi there,
I'm pretty stuck in my patch. If someone have some clues...
Basically, I'm interested in having very few spheres or discs (less than 15) moving in a GL world as a flock: i'm using jit.boids.3d bind to the jit.gl.multiple (position input) et voilà! Until here, I'm fine...

Now, and it's where it begins to stuck, my goal is to make interact the boids system with some phys.ghost, to attract, repel or shape the flock: instead of sending it directly to jit.gl.multiple, it's going through a jit.phys.multiple (position input) but here, until a position is sent (from the jit.boids.3d), nothing more can happens (see attached voids_physv0.1 patch)

I tried a workaround method (see attached multiple_test patch)in not using jit.boids.3d and creating a unique jit.phys.multiple (constrained by 6dof) but the result is not as expected (for instance, I can't control the minimum distance between the spheres to avoid collisions... - I tried with "sendconstraint position1 x x x" message but it's hard to understand how it can works).

If for all of this, you have some informations, I would be happy!!

Thank you.

B.

boids_phys_v0.1.maxpat
Max Patch
multiple_test.maxpat
Max Patch
Dg's icon
Max Patch
Copy patch and select New From Clipboard in Max.

I think in the case of boids you use "attractpt $1 $2 $3" for a basic interaction with it, not sure at all any phys.ghost is able to take control over the boids engine …