I found it in Daniel Schiffman’s tutorial Nature of Code and also the youtube tutorials by Schiffman in it
But the sad news is still after replacing PBox2d with Box2d the error persists.Now it says Body doesn’t exist
Is thr any tutorial where the updated form of box 2d is properly worked out.
I am not very old into processing and in the bargain must be asking some questions that has already been answered.Please bear with me
now that i have extracted the JBox2d from github how to i install it in processing mannualy
should i copy the extracted folder of JBox2D into the library folder that we find inside the core folder of processing .
or what is the procedure plz xplain cause I am still getting the error the class Box2D does not exist
and also PBox2D doesn; exist
I am actually also working through Dan’s tutorial on this as well. Since some of the class names/functions/variables are depricated, I took a look at the examples he included in his library. These examples have the updated information! I took a look at your code and was able to fix most of it (at least until it stopped giving me red marks). Here is what I did:
Added stars at the end of the import statements (makes it so it imports all in that part of the library): import shiffman.box2d.*; import org.jbox2d.collision.shapes.*; import org.jbox2d.common.*; import org.jbox2d.dynamics.*;
Box2D class is now called Box2DProcessing: Box2DProcessing box2d;
Setting a shape to a fixture is slightly different: fd.shape = ps;
The other errors were spelling mostly: Body body; BodyType.DYNAMIC;
After fixing these issues, your code runs, but it is still incorrect. If you have Dan’s library downloaded with Processing, you can go to File > Examples > Contributed Libraries > Box2D for Processing > box2d_exercise_solved. You should find the working code for what you want to do there, and you can compare and fix what you need to.