I heard that it is a physics engine, and I could use it to simulate the throwing of a ball. What exactly is it, and how would I use it with AS3 and Flash CS5.5? Tutorials???
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Box2D is a physics engine, so basically it runs along side your code and does purely abstract simulation. Each frame (or however often you wish) you do a “step” through the physics world, which updates the simulation by a single step, and then in your code you can read these values and apply them to your movieclips or whatever you’d like to use that data for.
As far as tutorials, the best source for them in my opinion is http://www.emanueleferonato.com/category/box2d/. Note that when it comes to flash you have your pick of implementations. You have the standard, pure AS3 implementation and the Alchemy implementation, which is faster. One of the alchemy versions is called the WCK or world construction kit. You can set it up to work with Flash CS as a sort of plugin, which allows you to visually construct your physical world using the IDE instead of code. Check it out here. You can also find a video tutorial for the WCK here.