# How do I get Raycasts to cast symmetrically?

I have an even distribution of points on the surface of a sphere and a list of Vectors for raycasting from the center, however when I try doing all of the casts the directions seem to be in a 270 degree cone in the direction the original (now stationary) object was moving that I am performing the casts from.
Does anyone know why this warp is happening and how to avoid it?

``````Vector3 explosionPosition = transform.position;
List<Vector3> points = new List<Vector3>(BlockIndex.SphereSurfacePoints(radius + 2));
float rayDamage = damage * 0.0027777777777778f;
float thisRay = rayDamage;
RaycastHit[] hits;
SortHits sorter = new SortHits();
rigidbody.isKinematic = true;
collider.enabled = false;
int i = 0;
for (int x = 0; x < points.Count; x++)
{
// reset vars befor raycast
thisRay = rayDamage;
i = 0;
//cast a ray for the current point
if (hits != null && hits.Length > 0)
{
foreach (RaycastHit hit in hits)
{
if (thisRay > 0)
{
DestructableObject dObject = hit.collider.GetComponent<DestructableObject>();
if (dObject != null)
{
float currdamage = dObject._currentHP;
dObject.ApplyRayDamage(thisRay);
thisRay -= currdamage;
}
if (hit.collider.rigidbody)
explosionPosition,
0);
}
if (thisRay > 0)
else
i = hits.Length;
}
}
}
return;
``````

SphereSurfacePoints is the precomputed list of Vector3 coordinates. To debug I tried instantiating cube primitives at each of the points and it makes a perfect sphere.

This is the function that returns the array:

``````        public static Vector3[] UniformPointsOnSphere(float numberOfPoints)
{
List<Vector3> points = new List<Vector3>();
float i = Mathf.PI * (3 - Mathf.Sqrt(5));
float offset = 2 / numberOfPoints;
float halfOffset = 0.5f * offset;
float y = 0;
float r = 0;
float phi = 0;
int currPoint = 0;
for (; currPoint < numberOfPoints; currPoint++)
{
y = currPoint * offset - 1 + halfOffset;
r = Mathf.Sqrt(1 - y * y);
phi = currPoint * i;
Vector3 point = new Vector3(Mathf.Cos(phi) * r, y, Mathf.Sin(phi) * r);
``````hits = Physics.RaycastAll(explosionPosition, points[x] - explosionPosition, radius);