diff --git a/Assets/Script/DropItem/DropItem.cs b/Assets/Script/DropItem/DropItem.cs index decf21e8e..c329a9f89 100644 --- a/Assets/Script/DropItem/DropItem.cs +++ b/Assets/Script/DropItem/DropItem.cs @@ -59,10 +59,15 @@ public class DropItem : ProjectileBase gameObject.SetActive(true); m_itemid = itemid; m_itemamount = amount; + Vector3 targetpos = startpos; switch (m_itemid) { - case 2: startpos += Vector3.up * 0.25f; break; + case 2: + startpos += Vector3.up * 0.25f; + targetpos = DSUtil.Get_RandomPos_onNavMesh(startpos, 2f, 3f); + targetpos += Vector3.up * 0.25f; + break; } m_Collider.enabled = false; @@ -84,7 +89,7 @@ public class DropItem : ProjectileBase // } //} } - }, startpos, DSUtil.Get_RandomPos_onNavMesh(startpos, 2f, 3f))); + }, startpos, targetpos)); StartCoroutine(Co_Rotation_Y()); StartCoroutine(Co_Off(20f)); } @@ -119,7 +124,7 @@ public class DropItem : ProjectileBase float t = 0f; while (true) { - t += Time.deltaTime * 20f; + t += Time.deltaTime * 30f; t = Mathf.Repeat(t, 359.9f); transform.eulerAngles = new Vector3(0f, t, 0f); yield return null;