Showing the changes to libraries/physics/src/CharacterController.cpp (1 of 1 file). Show all
Unified · Split
| @@ -189,7 +189,7 @@ void CharacterController::addToWorld() { · 188 unmodified lines | |||
| 189 | _rigidBody->setCollisionFlags(btCollisionObject::CF_CUSTOM_MATERIAL_CALLBACK); | 189 | _rigidBody->setCollisionFlags(btCollisionObject::CF_CUSTOM_MATERIAL_CALLBACK); |
| 190 | 190 | ||
| 191 | // enable CCD | 191 | // enable CCD |
| 192 | _rigidBody->setCcdSweptSphereRadius(2.0f * (_radius + _halfHeight)); | 192 | _rigidBody->setCcdSweptSphereRadius(_halfHeight); |
| 193 | _rigidBody->setCcdMotionThreshold(_radius); | 193 | _rigidBody->setCcdMotionThreshold(_radius); |
| 194 | 194 | ||
| 195 | btCollisionShape* shape = _rigidBody->getCollisionShape(); | 195 | btCollisionShape* shape = _rigidBody->getCollisionShape(); |
| @@ -556,7 +556,7 @@ void CharacterController::setLocalBoundingBox(const glm::vec3& minCorner, const · 360 unmodified lines | |||
| 556 | 556 | ||
| 557 | if (_rigidBody) { | 557 | if (_rigidBody) { |
| 558 | // update CCD with new _radius | 558 | // update CCD with new _radius |
| 559 | _rigidBody->setCcdSweptSphereRadius(2.0f * (_radius + _halfHeight)); | 559 | _rigidBody->setCcdSweptSphereRadius(_halfHeight); |
| 560 | _rigidBody->setCcdMotionThreshold(_radius); | 560 | _rigidBody->setCcdMotionThreshold(_radius); |
| 561 | } | 561 | } |
| 562 | } | 562 | } |