I don't think chipmunk is going to be fast enough for any kind of fluid simulation with particle attraction forces. I had a go & couldn't get anything to work with decent frame rates - here's my best attempt:
https://dl.dropboxusercontent.com/u/523 ... nTest.capx
global number centerx=0
global number centery=0
--- set centerx to 0
--- set centery to 0
for each sprite
--- add sprite.x to centerx
--- add sprite.y to centery
--- set centerx to centerx/sprite.count
--- set centery to centery/sprite.count
--- sprite: apply force polar(angle(self.x,self.y,centerx,centery), 100)
R0J0hound wrote:One thing I haven't tried that's used in fluid simulations is velocity smoothing. Basically you average out the velocity of the particles around another particle, where the weight they have in the average depends on the distance.
These cells create a single microorganism having the force of movement ONLY FROM the original CELL.
Users browsing this forum: No registered users and 6 guests