smooshing...

i want to start the agents off in the simultaion as if they've just been smooshed... i.e. they all start from the same point... how do it do this???

cheer
gregger G

smooshing...

If your agents are all of the same type, you can just do this:

all Agents move to ( 0, 0, 0 ).

... with the proper agent type, of course.

- jon

smooshing...

is my 'agent' the thing that flies abooot?

cheer
gregger G

smooshing...

gregger G...

gregger wrote:is my 'agent' the thing that flies abooot?

it is! in the swarm demo for example it is the 'Birds'

so you wanna put jk's code in the init section of the Bird class...

smooshing...

cheer v lots

it work!

cheer again
gregger G

smooshing...

i now get a 'divide by zero' error message when smooshing at the start of the simulation...

please advise...

cheer
gregger G

smooshing...

i guess the problem is to do with

if |newVelocity| > maxVelocity: 
newVelocity = maxVelocity * newVelocity/|newVelocity|.

if you use the location with a small bit of offset position from 0,0,0 then you should get it working.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.