Strange behavior of convexSweepTest()?

Post Reply
user64
Posts: 14
Joined: Fri Jan 28, 2011 9:03 pm

Strange behavior of convexSweepTest()?

Post by user64 »

Hello.
I code my own character controller which is similar to btKinematicCharacterController. There are some fundamental things that I don't understand. I've tried to find answers on the forum, but there was not enough information.

1). Sometimes I call btCollisionWorld::convexSweepTest() and get btCollisionWorld::ConvexResultCallback::m_closestHitFraction = 0. I.e. the collision shape is touching(???) the terrain or has penetrated it on previous iteration. Why does it happen?
2). What for is btKinematicCharacterController::recoverFromPenetration()? Does it solve the problem #1? I don't want any penetrations. Can I get rid of penetrations forever?
3). Will the using of parameter allowedCcdPenetration with value != 0 ever help?

I noticed that the thing #1 happens frequently if the collision shape (capsule/cylinder) moves with small angle to a vertical wall.
IS IT A BUG OR A FEATURE?

Thanks.
Post Reply