elect
12/01/2017, 10:59 AMwhen-else different?
val algo = when {
resultOut.closestPointDistanceThreshold > 0 -> dispatcher.findAlgorithm(compoundWrap, otherObjWrap, null, DispatcherQueryType.CLOSEST_POINT_ALGORITHMS)
else -> { //the contactpoint is still projected back using the original inverted worldtrans
if(childCollisionAlgorithms[index] == null)
childCollisionAlgorithms[index] = dispatcher.findAlgorithm(compoundWrap, otherObjWrap, sharedManifold, DispatcherQueryType.CONTACT_POINT_ALGORITHMS)
childCollisionAlgorithms[index]
}
}