I would like to apply forces of 2 ICompoundField() (curl field + attractor field) to a Boid() object that I've coded myself. This boid has an applyForce() function where it reads the force value corresponding to its position in the compound field and then add it to its acceleration vector.
Dear Sugihara San,
I would like to apply forces of 2
ICompoundField()
(curl field + attractor field) to aBoid()
object that I've coded myself. This boid has anapplyForce()
function where it reads the force value corresponding to its position in the compound field and then add it to its acceleration vector.Unfortunately, doing so gives me very different results from your original sketch entitled "Swarm Formation by Force Fields".
IGravity(0,0,-2)
insetup()
)I would really appreciate if you could explain how did you mix the curl force and attraction force together to get such a smooth motion.
Respectfully,
solub
Edit: Full script if needed