Stacking boxes

Adversus
Posts: 19
Joined: Mon Nov 10, 2008 11:24 am

Stacking boxes

Post by Adversus »

Hi Guys,

If I try to stack a few bounding boxes of the same mass, the simulator goes mad if the mass of the boxes is over 1.0f, if it's less then it's more stable. Getting more and more stable the lighter the boxes until eventually it's grand.

I find this weird as although the forces will be larger, surely they'll just get cancelled out resulting in the same overall value.

Is there something I should do to allow any size masses to work?

Cheers,
Adversus.
sparkprime
Posts: 508
Joined: Fri May 30, 2008 2:51 am
Location: Ossining, New York

Re: Stacking boxes

Post by sparkprime »

I can stack boxes of much greater mass than that. What are you stacking them on? Can you reproduce in a bullet demo
Adversus
Posts: 19
Joined: Mon Nov 10, 2008 11:24 am

Re: Stacking boxes

Post by Adversus »

The other thing I've noticed is that if I change the mass, the acceleration due to gravity also changes. Heavier objects fall faster.

Objects over about 1.5f fall through each other.

I'll try to make a bullet demo to test.
Adversus
Posts: 19
Joined: Mon Nov 10, 2008 11:24 am

Re: Stacking boxes

Post by Adversus »

OK it works now. I upgraded bullet from 2.72 to 2.74.

Wow, I'm shocked that this even existed as it seems like such a fundamental thing, but oh well it's all working now and hopefully this should really improve the other collision/physics problems I've been having.
Adversus
Posts: 19
Joined: Mon Nov 10, 2008 11:24 am

Re: Stacking boxes

Post by Adversus »

OK now upgrading to 2.74 from 2.72 (I tried 2.73+2.75, same thing) it's broken "world static collision" on iPhone but not on Mac or Windows.

It seems to "bounce" funny and it pops through very easily however collision on just boxes is much better and the mass and physics acts as they should.

I tried putting back the original btEpaGtk.cpp file but no luck however I might not have made all the changes I needed for that, I simply replaced the includes in:

Bullet-C-API.h
btConvexConvexAlgorithm.h

I also tried using the default memory pool incase that was causing the issue however it wasn't.

Now this might be interesting, 2.73 doesn't seem to fix the physics behaviour however it does break the static world collision.

Any idea what might have changed to cause this?
Adversus
Posts: 19
Joined: Mon Nov 10, 2008 11:24 am

Re: Stacking boxes

Post by Adversus »

OK I got it working now.

I had to replace some of the maths classes with their 2.72 versions. This made the collision perfect but too good as then I had the "internal edges" problem, so effectively as it slid from one triangle to another it would hit a wall where the edge was. This always happened a bit however I suspect in the past it was better because the collision wasn't so "perfect", so I made another few changes from 2.72 to get it back the way it was and now everything works in 2.74. Yah!

As for the "internal edges" problem I see there are a few suggestions on the forums so I might give them a go later on but as for now things are good enough.