I have been doing alot of experimenting with processing and toxiclibs in the last few days and I have well and truly hit a snag. I have looked through the javadocs, examples, google, etc. and I can't figure out what to do next.
What I have is a control p5 slider hooked up to a variable which is meant to adjust the strength (or radius) of the attraction force that is being applied to each particle.
The function currently looks like
void SetAttForce(VerletParticle p){
attForce.setStrength(ptAtt);
p.applyBehaviors();
//physics.applyBehavior(attForce);
}
In this case attForce has already been added to all the particles, all I am trying to achieve is adjusting it using a variable.
So far everything I have tried seems to either do nothing, apply to only one particle in the list, or cause the whole thing to break. I believe the problem may be getting the applied p behavior back into the VerletPhysics object?
Thanks in advance, it's probably obvious but I think my brain melted some time ago.