btBoxShape and sliding on a 3d tiled floor

Post Reply
Posts: 1
Joined: Sat Jul 14, 2012 6:41 pm

btBoxShape and sliding on a 3d tiled floor

Post by Stratofish » Sat Jul 14, 2012 7:01 pm


I'm new to Bullet and have a question I haven't been able to find in old posts or via Google.

I'm writing a game and have my level set out as large blocks, 8x8x8 blocks and all 1 unit wide, 0.6 units tall. I'f you ever seen old-school isometric games like Head over Heels, that sort of thing.

Anyway I'm using a btBoxShape for my collisions. It's working just how I want but occasionally the character gets 'snagged' moving between two neighbour blocks. The tops are coplanar so shouldn't be an issue in my (nieve) eyes but I'm guessing it is either floating point error or just a small amount of inter-penetration as I have gravity effecting on the character.

I specifically want the character to be able to hang far out over the edge without falling off so a btSphereShape or btCapsuleshape aren't any help. I have the angular limit set to 0 so it doesn't topple off. I have tried playing with the collision shape buffer size, both positive and negative but it made no difference.

My question is - Is there any setting I am missing that will allow this to slide properly with a btBoxShape or do I have to go to a btConvexHullShape and define a shallow chamfer-based cube instead?

cheers, Dan

Post Reply