Confining boids movement-space to cylinder?

I’ve been learning and playing with boids via the particle system, and after a few successful tests of single systems swarming around themselves, as well as attacking other systems, I thought it would be neat to be able to conform the swarming movement to an object.

To be more clear, I’m looking to have a boid swarm moving about inside an enclosed transparent cylinder, for instance something make of glass. As the particles get close to the glass, they would actually impact or rebound back towards the inside of the glass.

I have gone in to the physics tab and set the ‘glass’ cylinder as a collision object, but that doesn’t seem to be enough. The permiablility has been set to 0, and even when the ‘container’ catches and bounces some of the boids, many of them sneak out as well. Does anybody know a way to make this work?


You could try and inverting the normals on the cylinder so they are pointing inwards … I haven’t played with the boids system a lot, so I am just speculating here …