I am new at game development want to know that how can I implement bullet physics in libgdx. I searched lot of things on Internet but nothing found worthy.

  • 2
    \$\begingroup\$ This question is a bit overbroad for our format. \$\endgroup\$ Mar 9 '13 at 5:44
  • \$\begingroup\$ After studying the links given by Mr. Cameron Fredman I understand the basics of bullet physics but still in dilemma that how can i implement bullet physics in 2d game built in libgdx platform. I need some kind of sample code or tutorial which help me. \$\endgroup\$ Apr 2 '13 at 7:40
  • \$\begingroup\$ @NishantAnindya I know I'm like 2 years late, but for documentating purposes: for 2D games, use Box2D, it's a lot simpler and enough for 2D physics. Let Bullet only for your 3D games. \$\endgroup\$ Sep 5 '15 at 3:24

As I mentioned in my comment above, this question is a bit overbroad, but here's the source code for the JNI bullet engine in libgdx. And here's the wiki. The Bullet User Manual is a pdf file located in the root of the Bullet Physics SDK, which might make a good place to start.

You'll need to add gdx-bullet.jar and gdx-bullet-natives.jar to your desktop project, and gdx-bullet.jar to your Android project. You’ll also need to copy the libgdx-bullet.so files from the extensions/gdx-bullet/armeabi and armeabi-v7a folders to your Android project’s libs/armeabi and armeabi-v7a folders of course.

And there's this from the google codebase:

Setting up Bullet with libgdx To use bullet physics in your project, you’ll need to add gdx-bullet.jar to your main project. Alternatively you can add the gdx-bullet project to the projects of the build path of your main project.

For your desktop project you’ll need to add the gdx-bullet-natives.jar to the libraries.

For your android project you’ll need to copy the armeabi/libgdx-bullet.so and armeabi-v7a/libgdx-bullet.so files to the libs folder in your android project.

Bullet isn’t supported for GWT at the moment.

Initializing Bullet Before you can use Bullet, you’ll need to load the libraries. This can be done by adding the following line in your create method:


There's a good deal more information at the links provided above.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.