Basic Test Case - Objects keep sliding

cpugh
Posts: 2
Joined: Mon Mar 14, 2016 8:11 am

Basic Test Case - Objects keep sliding

Post by cpugh »

Hi,
I'm evaluating physics engines for my game and was hoping I could get some help with Bullet.

I looked at Bullet and PhysX.

My test case is to have a floor plane, the stanford bunny, and a falling box that hits the bunny.

Further features of my test case are to have a character controller that I can use to push the box around and jump on top of it, and a ramp.

In PhysX, I was able to get all this set up rather painlessly and it just works.

In Bullet, I'm having a number of issues with this basic setup. I'll start with the most basic however; in Bullet, objects seem to slide around like they're on an ice hockey table. Instead of coming to rest, the box will sometimes start spinning in circles and vibrating. I'm using the exact same values for masses, restitution, and friction as PhysX. Even if I jack up the friction on the box and floor to insane amounts, I get more or less the same behavior, except the box will stop on its corner.

You can see the difference here:
https://www.youtube.com/watch?v=1zsjfa4 ... e=youtu.be

I feel like I must be doing something very basic wrong with this demo. This is my setup code: http://codepad.org/QgRsWWk5

I installed the Bullet SDK on OSX via Homebrew, version 2.83.6.

My demo is simple I can share the entire program if it helps.

I would appreciate any help with this!

I like Bullet's featureset, API, and I'd really rather use a library with a developer friendly license.
cpugh
Posts: 2
Joined: Mon Mar 14, 2016 8:11 am

Re: Basic Test Case - Objects keep sliding

Post by cpugh »

Update:
-I tried replacing the ground plane in Bullet with a box shape, since a stack overflow post suggested that the plane shape ignored their friction and restitution coefficients.

-I also replaced the triangle mesh shape with a tall skinny box in both tests on the hunch that triangle meshes might be buggy (since I've gotten the box to phase through geometry even with CCD enabled, and since any camera controller I write or use in Bullet allows me to easily push the box through walls if I hold the forward button enough)

Both of these things seemed to help with the insane sliding and spinning but Bullet still sends the box flying nearly twice as far along the X axis as PhysX. I might try PAL to absolutely verify the issue by running the exact same code with a different physics implementation.