Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

Class gravityBehavior does not exist!!

$
0
0

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.


Viewing all articles
Browse latest Browse all 2896

Trending Articles