예제 #1
0
 private void UpdateCollisionData(MeshCollisionData data, float distance, CollisionResult result, MeshTriangle triangle)
 {
     if (!data.HasCollided ||
         distance < data.CollisionDistance)
     {
         data.CollisionDistance = distance;
         data.CollisionResult = result;
         data.CollisionId = triangle.Id;
         data.Triangle = triangle;
         data.HasCollided = true;
     }
 }
예제 #2
0
 public MeshCollisionResult(CollisionResult rayCollisionResult, byte triangleId = 0, MeshTriangle hit = null)
 {
     RayCollisionResult = rayCollisionResult;
     TriangleId = triangleId;
     Triangle = hit;
 }