Strange bug or am I doing it wrong?

mike
Posts: 2
Joined: Thu Jan 17, 2008 1:02 pm

Strange bug or am I doing it wrong?

Post by mike »

I'm making a 2d isometric shooter inspired by Infantry (which wasn't free yet when I had started developing it), and I'm using the bullet physics engine. However I've come across a bit of a deal breaking bug, or I'm not using the engine properly.

Here's how I have things setup.

The floor is a static plane at y = 0 (y is up). The player is a cylinder shape (bug does not appear with sphere shape), and I have walls which are vertical box shapes with mass 0. When the player is a cylinder or box shape (only tested with these two other than sphere), when it touches the box shape from a specific side the whole physics engine slows to a crawl. I'm not losing fps, but everything moves very SLOWLY.

For example, when I start shooting then move the player against the wall to cause the bug to appear, all the projectiles instantly slow down to almost nothing.

I do have angular factor set so that the player collision shape doesn't rotate, and I've tried pretty much everything I could think of, but I can't get rid of the bug. If you would like to see it for yourself I could upload the latest build of the game to demonstrate the bug, let me know if you would like me to.

Other than that, I've also had some tunneling issues, but I believe thats to do with the continuous collision world being a work in progress. Just some 1 mass spheres tunneling through walls (boxshape).

If it helps to give you an idea, I wrapped some of bullet with my own classes like PhysicsObject which derives from btRigidBody and passes nulls to the btRigidBody constructor. Looking through the source I tried to copy everything it would normally do in the constructor after construction, like setting the collision shape and setMassProps.

Any help would be greatly appreciated, I'm not really up for swapping physics engines at the first hurdle.
mike
Posts: 2
Joined: Thu Jan 17, 2008 1:02 pm

Re: Strange bug or am I doing it wrong?

Post by mike »

Since no one knows anything, I've uploaded the game for winxp/vista. Basically all you have to do is, walk into the wall on your right while shooting and you will see the problem. Forgive any visual inaccuracies with the physics as I've been messing around with the shapes etc.

One possible workaround I feel that could fix this is, do what was mentioned in the other thread for a character, a cylinder on a sphere. The sphere would handle collision with floor and wall and this bug would not see the light of day, hacky but I'm willing to take what I can get. :p What would be the best way to do this?

Oh also, what is the capsule shape? It takes radius and height, which basically sounds like a cylinder to me.

256kB forum limit :(

So here's the DL...

http://www.megaupload.com/?d=2DDPCCIC