We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello all I just started using toxiclibs and I'm a new user of processing(so not much experienced :) ) I'm getting and error while using a physics 2D behavior. I'm following nature of the code tutorials.
import toxi.geom.*;
import toxi.physics2d.*;
import toxi.physics2d.behaviors.*;
VerletPhysics2D physics;
void setup() {
size(800, 600);
physics = new VerletPhysics2D();
physics.setWorldBounds(new Rect(0, 0, width, height));
physics.addBehavior(new GravityBehavior(new Vec2D(0, 0.5)));
}
and I get this error that the class gravity behavior does not exist. Somehow stuck. I would appreciate if someone help me with this.
Answers
Hello
I found this code in samples from toxiclibs, and the system doesn't point "GravityBehavior2D" as an error, besides it works. Check it out
Ha, this is useful information in perhaps a way that you hadn't intended... The original is using GravityBehavior and not GravityBehavior2D. Error might be a typo, might be an old example.
The problem was the compatibility between the processing version I'm using for and toxiclib version. I used version 19 and downloaded directly from the toxiclib official website and the error is gone now :)
Yeah koogs thats true. Thanks