<@U2H3SABQF> Probably more like this ``` val algo ...
# codereview
m
@elect Probably more like this
Copy code
val algo = when {
    resultOut.closestPointDistanceThreshold > 0 -> 
        dispatcher
            .findAlgorithm(compoundWrap, otherObjWrap, null, DispatcherQueryType.CLOSEST_POINT_ALGORITHMS)
    childCollisionAlgorithms[index] == null ->   //the contactpoint is still projected back using the original inverted worldtrans      
        dispatcher
             .findAlgorithm(compoundWrap, otherObjWrap, sharedManifold, DispatcherQueryType.CONTACT_POINT_ALGORITHMS)
            .also { childCollisionAlgorithms[index] = it }
    else -> childCollisionAlgorithms[index]
}