Collision Point Bug in juWorld_Collision()
--------------------------------------------------------------------------------
It doesn't return the closest collision because BestDist is never set. This portion of code: 

// Record the closest collision point 
if (Dist < BestDist) 
{ 
    CollisionInfo->Impact = Impact; 
    CollisionInfo->Plane = Plane; 
    CollisionInfo->Object = SubObject; 
    Hit = JE_TRUE; 
} 

Should read: 

// Record the closest collision point 
if (Dist < BestDist) 
{ 
    CollisionInfo->Impact = Impact; 
    CollisionInfo->Plane = Plane; 
    CollisionInfo->Object = SubObject; 
BestDist = Dist; 
    Hit = JE_TRUE; 
} 

Also, the Collision() function in ActorObj.c is not implemented. 


 

