i downloaded the src.zip…
so… how do i go about using it in my program?
there’s so many files, is the build.xml important?
i downloaded the src.zip…
so… how do i go about using it in my program?
there’s so many files, is the build.xml important?
To use Phys2D, you don’t need the src.zip. You can use the phys2d*.jar.
You have to add this library to your editor (in netbean, on the project/library do a right click and select “Add jar/folder”).
Then you can use Phys2D now in your project
The basic use of Phys2D is :
World world = new World(new Vector2f(0.0f,0.0f),NB_ITERATION); // Creating the world ( gravity vector, number of iteration by frame )
Body body = new Body( new Circle(0.1f), 0.001f); // Creating body ( shape, mass)
world.add(body); // adding body to the world
then call for every frame :
world.step(); // Update the position/velocity/colition/… of all body that are in this world.
wow thanks for replying, i’m gonna try it out now~ ;D
umm cannot find symbol World ???
edit: oh wait need to import net.phys2d.(stuff)
k i go try again~
hi just wondering what is a good number for the iterations?