Crash when CharacterController collides with btHeightfieldTe

monah
Posts: 8
Joined: Thu Nov 19, 2009 1:05 pm

Crash when CharacterController collides with btHeightfieldTe

Post by monah »

Hi all. I use bullet 2.76 after applying the patch http://code.google.com/p/bullet/issues/ ... Controller collision with btHeightfieldTerrainShape ends with crash in file btKinematicCharacterController.cpp, class btKinematicClosestNotMeConvexResultCallback, in function addSingleResult, line that produces an error hitNormalWorld = m_hitCollisionObject->getWorldTransform().getBasis()*convexResult.m_hitNormalLocal. m_hitCollisionObject->getWorldTransform().getBasis() returns a null pointer and crash with error Access violation when reading. How to fix this error? Sorry for my English.
monah
Posts: 8
Joined: Thu Nov 19, 2009 1:05 pm

Re: Crash when CharacterController collides with btHeightfie

Post by monah »

I found a solution to this problem. To line
hitNormalWorld = m_hitCollisionObject->getWorldTransform().getBasis()*convexResult.m_hitNormalLocal;
replaced
hitNormalWorld = convexResult.m_hitCollisionObject->getWorldTransform().getBasis()*convexResult.m_hitNormalLocal;