예제 #1
0
 public SupportPoint SumSupport(CollisionResult result, vec3 Dir)
 => SumSupport(result.Body1, result.Body2, Dir);
 /// <summary>
 /// Uses the result of GJK and runs EPA to find the smallest vector to move either entity by to have the objects making touching contact rather than penetration.
 /// </summary>
 /// <param name="result">The GJK result used for the calculation</param>
 /// <returns>The vector to move either entity by</returns>
 ///
 public vec3 GetPenetrationDepth(CollisionResult result)
 => GetPenetrationInfo(result).Item1.ClosestPoint();