Пример #1
0
 /// <summary>
 /// casts a line through the spatial hash and fills the hits array up with any colliders that the line hits
 /// </summary>
 /// <returns>The all.</returns>
 /// <param name="start">Start.</param>
 /// <param name="end">End.</param>
 /// <param name="hits">Hits.</param>
 /// <param name="layerMask">Layer mask.</param>
 public static int LinecastAll(Vector2 start, Vector2 end, RaycastHit[] hits, int layerMask = AllLayers)
 {
     Insist.IsFalse(hits.Length == 0, "An empty hits array was passed in. No hits will ever be returned.");
     return(_spatialHash.Linecast(start, end, hits, layerMask));
 }