Shows how to create create a Basic Box2D / Scene2D with effects.
Concepts used in the code
- Create a Stage and Image Actors (See basic Image Sample)
- Create a Screen (See Screen Sample)
- Introduce concept of World with Box2d: Static and Dynamic objects
In this example we create a World using Box2D with gravity. Then we create two Bodies, One Static, for the ground and one Dynamic for the note.
Each Body is in its own class which inherit from an Scene2d Image Actor. The actor position and angle is updated based on the Bodies position and Angle.
Full Code available for download here
Continue here for creating and loading complex shapes with Box2D and LibGDX.