Panda Bullet

Did you use a hinge join to connect one body to a fixed location within the world, or did you use the hinge joint to connect two bodies? Please show you code.

I basicaly used the example code from the tests.

How do you connect it to another body?

The constraints have two constructors, one for attaching a single body to a fixed location in the world, and one for attaching two bodies. For meaning of the parameters Uta best to rely on the original Bullet documentation for now.

Edit:

Never mind, got it working perfectly!

This is amazing…

I’m getting the error below trying to run the the first test (01_Basics.py). I’ve built bullet 2.78, and the waf build / install of libpandabullet went fine.

    self.debugNP = self.worldNP.attachNewNode(BulletDebugNode('Debug'))
TypeError: cannot create 'libpandabullet.BulletDebugNode' instances

I’m running on Ubuntu 11.04. Any ideas?

Which version of Panda3D are you running? A development snapshot perhaps?

Nope, 1.72.

Are you expecting any build options from bullet? I tried building the debug info as well, but that didn’t help.

The interesting thing about Ubuntu 11.04 that you should be aware of is Python 2.7 became the default, however I ran the waf build process as well as the test code with python 2.6.

Hmmm… I’m building Bullet shared libs, like this

cmake . -DBUILD_SHARED_LIB=ON -G "Unix Makefiles"

So you did compile Panda3D youself, or did you use a binary package from the Panda3D website? If so, which one?

Hi,

I am using the car demo (as a base), the car is very realistic.

I wonder if there is a way to make the tires seem less ‘grippy’ or ‘rubbery’ or ‘sticky’, I am attempting to make a car that slips alot (for drifting, high speeds, aka a racing game)

I’ve been trying everything in the book to get slippery tires of some sort - do you have any suggestions?

If it helps, I’m going for a feel like the car in a few games (perhaps you’ve tried them)
TrackMania Nations or Mania Drive
(Mania Drive is open source and free if you need to try and see what I’m talking about more, there are also several videos of it on youtube)

In short:
The car demo right now makes the car flip over really quickly when it gets at high speeds, is there any way to change this that you know of?

Great news about buildbot versions by the way!

Thank you,
~powerpup118

EDIT:
And also, is there any plausible way of getting a hinge constraint working on Linux? (I’m thinking I might be able to build the car out of spheres hinged to a frame or so)

First, I don’t know how to propertly setup Bullet vehicles to achieve specific desired behaviour. The right place to look for answers would be the Bullet forums. But let’s see what little info I can provide for vehicle physics:

Vehicle physics are all about fakeing and tuning. This is true for all physics engines. The BulletWheel class offers lot’s of properties for tuning. You could try and choose different values.

Two things you could do here:
1.) Move the center of gravity to a lower place, even below the surface the car is moving on.
2.) When driving at high speed, say 250km/h (I’m from Germany :-), you would only apply very small sterring angles in real life. This is difficult using the keyboard or game pads. What you could do is to decrease the max. steering angles with increasing speed.

Well, I first would have to know what is going wrong.

This is very very tricky. You will have to handle longitudal and lateral friction for each tire. I don’t think anisotropic friction is suited for this purpose.

The only reasonable usage of joints and rolling tires is maybe off-road simulations. Not the kind where you are racing through mud, but the kind where you crawl over rocks.

I used the Mavrick package from the website (http://www.panda3d.org/download/panda3d-1.7.2/panda3d1.7_1.7.2~maverick_i386.deb) which gave me a warning about not being a “secure” package or something like that, but it let me install it anyway.

I assume everything installed fine since my projects all work the same as before.

I did have to finess the install a bit due to some permissions issues ([url][FIXED] Panda3d only for sudo (Ubuntu repo install)]), and I have to specify my projects to run as Python2.6, but other than that everything appears to be fine.

@tshannon
Then you could try to install the current development snapshots for Maverick. It already comes with Bullet support.

EDIT: This would be panda3d.org/buildbot/builds … _amd64.deb

hows the making manual pages going?

There is some progress. I have very little time these weeks, but I’m positive that it will be finished for Panda3D 1.8.0.

well, I think that will not happen for few months.

Just gave some of my first test runs with Bullet today and I have to say it is looking mighty good. In particular I want to thank enn0x for adding the debug render mode, that is an excellent addition and was sorely missed in ODE (and probably PhysX? I wish it could be added for both).

While the current documentation in the manual is pretty good for the basics, I hope you won’t forget to add more once you’re more finished with the coding side :slight_smile:

Anyhoo, very nice work so far.

Okay, so I fooled around a bit and created a simple platformer type of game movement using a BulletBoxShape and BulletCharacterControllerNode for my character. Everything works, except that when I bash my “head” in the bottom of the platforms, it enables me to keep on jumping again and again as if I’m touching the “ground”.

Is there some internal setting or trick that can be easily used to prevent this? I kinda of assumed isOnGround was for just such things but it seems to return true when bashing the ceiling. I came up with a simple way to circumvent this in my scenario (I don’t allow repeated jumps by holding down a key), but I’m wondering if this behaviour is intended since the character class does seem to differentiate between hitting something from the side.

There was a mention somewhere in the 4th page of this topic that BulletCharacterControllerNode is buggy and you’ll have to write your own sooner or later anyway.

Yeah, I noticed but was hoping things might have changed since then or will change in some possible update.

As far as I know, the character controllers are far from a priority for the Bullet developers, so I wouldn’t count on it.