From 2acfbd0f8f79b5dfb1f3be96298c007992f47259 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Mon, 30 Nov 2015 15:52:03 -0800 Subject: [PATCH] revert accidental CCD change --- libraries/physics/src/ObjectMotionState.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libraries/physics/src/ObjectMotionState.cpp b/libraries/physics/src/ObjectMotionState.cpp index 1199c3792a..7389d18143 100644 --- a/libraries/physics/src/ObjectMotionState.cpp +++ b/libraries/physics/src/ObjectMotionState.cpp @@ -135,7 +135,12 @@ void ObjectMotionState::updateCCDConfiguration() { btVector3 center; btScalar radius; _shape->getBoundingSphere(center, radius); - _body->setCcdMotionThreshold(radius / 4.0f); + _body->setCcdMotionThreshold(radius * RADIUS_MOTION_THRESHOLD_MULTIPLIER); + + // TODO: Ideally the swept sphere radius would be contained by the object. Using the bounding sphere + // radius works well for spherical objects, but may cause issues with other shapes. For arbitrary + // objects we may want to consider a different approach, such as grouping rigid bodies together. + _body->setCcdSweptSphereRadius(radius); } else { // Disable CCD