Whenever the player can’t pick up an item, or drops a few items at once, i want them to be dropped in a circle around the player. I use Check/OverLapShere to detect if there is already a spawned item, and if there is to move its position by and angle with physics.RotateAround.
It works for the first item, it detects all others nearby, but the moment i move it to the second location it does not detect the items. COuld it be that because they are spawned at the same location the collider doesnt detect them since their colliders are at the same place?
they are all at the same layer so that doesnt bother it
Collider intersects = Physics.OverlapSphere(inst.transform.position, 1.3f);
Debug.Log(intersects.Length + $"lenght of colliders ->{i}");
if (intersects.Length > 1)
{
Debug.Log(inst.transform.position + "befire");
inst.transform.RotateAround(pos, parentTrans.up, 15f);
Debug.Log(inst.transform.position + "after");
}
else
{
break;
}