Panda Bullet


No. I don’t see any need for an installer. Just copy the library (.pyd) to whereever you develop your game.


Some more info: There are two “tag” systems, the C++ tags (setTag, getTag) and the Python tags (setPythonTag, getPythonTag). The C++ tags are basically a dictionary with string keys and string values, and the Python tags are a dictionary with string keys and PyObject values.


i did this and when i try and run the first test file ( i get

DirectStart: Starting the game.
Known pipe types:
(all display modules loaded.)
Traceback (most recent call last):
  File "", line 20, in <module>
    from libpandabullet import BulletManager
ImportError: DLL load failed: The specified procedure could not be found.

i copied the manifest, the PYD and the SO into python’s library/site-packages folder, without putting it into any other folder


The self-compiled, or the .pdy from the download? What folder precisely - there is no “library” in any Python distribution? What Python version? The Python which comes with Panda3D or your local distribution? And what VC runtimes do you have installed? Please try to be a bit more verbose.

Sidenote: is the Linux library. You don’t need it on Windows.


the one from the download.

oops, meant Lib

the one that comes with panda.



Putting libpandabullet.pdy in lib/site-packages of the Python version which comes with Panda3D should work. However, a better places would be Panda3D’s ./bin directory. This is where the library will be once it is added to Panda3D’s codebase. You will see a lot of libpanda***.dll files there already.

Next questions: What version of Panda3D are you using? What OS are you using (assuming it is Windows - XP, Vista, 2003, 7, …) and is it 32bit or 64bit?

VC is short for Visual C, but if you have Studio 2008 installed I assume the VC runtime is ok. If not this would be a reason for compiling yourself.


Panda3D 1.7.0, Windows Vista Home Basic 32 bit. There are no pyd files in panda’s bin directory, most of them are in python’s DLL folder.


You are using a Panda3D version which is about one year older than the Panda3D version I used for compiling. You should report such deviations.

On the other hand it seems like the Panda3D snapshot builds are no longer available for download. Hmmm, you might try and use Panda3D 1.7.1 SDK, or compile yourself.

My fault. A .pyd file is nothing but a .dll which has been renamed. Old Python versions picked up libs with both filename extensions. Python 2.6 only picks up .pyd, if not loading the .dll directly (which is what Panda3D does).


Oh wow, this is awesome, i am checking demos to get a feel on how to use it :slight_smile:

There is one small bug

OS: win 7x64
panda: recent (less than a week) daily build

Ball in maze, when you tilt board so ball falls in bottom-right corner, just at beginning of game, change window focus to something else, and then back to game window, ball just dissapears

Also i noticed that if gravity is set to some higher value, objects shake… (When you move them, and after you stop moving them)
For example in 01_Basics, try setting gravity to 90. And try to 40.
With 40 shaking stops after some time (it probably stops with 90 after some time too, but i was too lazy to wait and see).
After looking more closely, i noticed that object shakes a bit even with “default” gravity


Is there windows binaries? I failed miserably at compiling…


Just download latest version, and run waf.bat, it is in root folder of project.



Thank you very much. The jitter you see when using higher values for gravity is normal. It is a problem inherent with every physics engine, and there is no solution which works fine in every case.

Here you could simple decrease the timesteps used when advancing the simulation time, for example like this:

    self.mgr.doPhysics(dt, 20, 1.0/180.0)

The default values are up to 10 timesteps each 1/60 second. Setting the timestep to 1/180 will reduce the jitter significantly.

Then there is damping. The sample doesn’t apply linear and angular damping.

Finally, Bullet offers an experimental method to apply some additional damping, but this method is not exposed so far. I will try to fine a way to do so for the next release.

About the BallInMaze sample: The maze has it’s orientation set explicitly each frame, depending on the mouse position. The ball falling through the floor might happen if within one frame the “floor” moves from below the ball to above the center of the ball. This can be avoided easily, for example by using a box for the floor (instead of a plane), but this would mean that I have to modify the maze.egg file. I don’t want to, since the intention of this sample is to show how to automatically set up much of a scene from “standard” Panda3D collision solids.



There are Windows binaries in every release. Look at the “test” folder. There you will find a file named “libpandabullet.pyd”.

The last release is quite old though, and I don’t know if the binaries work with Panda3D 1.7.1. The next release will be compiled using 1.7.1. It will be two about two weeks, since I am currently working hard on the softbody system.

Oh, and it will have improved waf files, which will check for required libs first. This way many of the compile problems, like not having Bullet libs compiled first, will be addressed.



Well then everything runs perfectly on Panda3d 1.7.1, Win7 64 bit.
Very nice.

just asking, what is there left to add?


Besides minor features like mentioned above? The softbody subsystem including attachments, for example. Or support for hardware (GPU) acceleration. Particle fluids, support for node serialization (bam), loading and saving the scene. Then there are aggregated objects built on top of the fundamental objects, like for example rag dolls or proximity sensors.

And finally there is always one thing to do: step back, take a critical look at what has been done, and try to make it better.


Yeah, increasing step rate helps with jitter!

What is current state of auto loading collision solids from egg files?

What i actually want to ask, what is your recommendation on how to load collision solids?

In sample section, you could write wrapper functions for common things (controls, lights,…) and just call it from each sample, it would make it easier to navigate trough code.

I have tried couple of simple tests, and everything seems very natural :slight_smile:

EDIT1: From what i have seen so far, bullet seems like a best option currently, and i will try to tell you about quirks that i meet and don’t like. I don’t think that i can help you in some other way…
Do don’t think that i don’t appreciate your work, i do and a lot! I just want to help you improve it :slight_smile:


Won’t particle fluids require modifications to Panda’s particle system?


I don’t know, since I have not yet made any thoughts about how to realize all these features, or if/when.

I think it is more important to consolidate the existing code than to rush for tons of new features. Also the content pipeline has high priority.


Maybe this article provides some more information:

I forgot to mention another method to avoid jitter: choosing the linear/angular sleep thresholds is such ways that when a body has only “fine” jitter it will be put to sleep.

Experimental. You can give it a try, but if you don’t get what you expect/want you should still set up you collision shapes by hand. Loading content is one of the most important topics in my opinion, but current state is that I play around with different options.

By hand.

No worries. Playing around with libpandabullet and giving feedback is probably the best help I can get. I might not be happy about some comments, but I do read them carefully and sooner or later try to realize the suggestions.


I want to make simple pong like game, to get feel on how everything works in bullet (one player surrounded by walls should work), and i have some questions :slight_smile:
Gameplay is 2d

How can i make an object not affected by physics?
Blue sphere is player, gray ones with “x” inside are pillars.
Player and pillars are capsules, black lines are walls. red circle is ball.
red line in right side is goal which only triggers event (thats ghost?)

Ball should collide with everything, but nothing besides ball should be affected with physics (ball cant push player or pillar or wall but it should be reflected from them).
I will probably hardcode limits for players movement, or put them inside boxes to limit their movement.