Stop adding motion in the kinematic character controller if the walk direction is near zero
This commit is contained in:
1 parent
366b2ef500
commit
2118ade465
1 file changed
+1
-1
@@ -636,7 +636,7 @@ void btKinematicCharacterController::playerStep ( btCollisionWorld* collisionWo
|
|||||||
// printf(" dt = %f", dt);
|
// printf(" dt = %f", dt);
|
||||||
|
|
||||||
// quick check...
|
// quick check...
|
||||||
if (!m_useWalkDirection && m_velocityTimeInterval <= 0.0) {
|
if (!m_useWalkDirection && (m_velocityTimeInterval <= 0.0 || m_walkDirection.fuzzyZero())) {
|
||||||
// printf("\n");
|
// printf("\n");
|
||||||
return; // no motion
|
return; // no motion
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user