I’m using a raycast and the raycast shot next to the object detects collisions and the raycast shot above doesn’t detect collisions.
Ray ray = new Ray(Edge.transform.position, transform.forward);
Debug.DrawRay(ray.origin, Edge.transform.forward * 50, Color.red);
RaycastHit hitInfo;
if (Physics.Raycast(ray, out hitInfo, 15, layerma))
{
Instantiate(Par2, hitInfo.point, Par2.transform.rotation);
}