KinematicCharacterController goes through boxes

lhaw
Posts: 6
Joined: Tue Dec 28, 2010 9:04 am

KinematicCharacterController goes through boxes

Post by lhaw »

I have a capsule shape attached to Bullet's kinematic character controller (2.79).

It works fine with a trimesh, but I've now added boxshapes as the doors, and it goes through them in the X direction. All boxes are static and have the same collision masks/groups.

Very curiously, it collides properly in the Z direction.


Each door is 1x3.5x0.03. The ones that face the Z axis collide properly, the ones that face X the character goes through.

Playing with margins and scaling only made the problem worse, ie it started to go through some of the Z-facing doors too.


I wonder if this is http://code.google.com/p/bullet/issues/detail?id=292 - does anyone else properly collide boxes with the character controller?
lhaw
Posts: 6
Joined: Tue Dec 28, 2010 9:04 am

Re: KinematicCharacterController goes through boxes

Post by lhaw »

As workarounds I had tried spheres, capsules, and a MultiSphere with one sphere.

While they all collided properly, they bulged out too much. I also tried non-uniform scaling with the MultiSphere, which is claimed to work in these forums, but it scales uniformly, useless for door blocking :(

If boxes can't be gotten to work, I think one workaround is a compound shape of three or more capsules.
lhaw
Posts: 6
Joined: Tue Dec 28, 2010 9:04 am

Re: KinematicCharacterController goes through boxes

Post by lhaw »

For any future visitors, I ended up making the doors proper triangle meshes too. Slightly less efficient than boxes, but works perfectly with the current character controller.