From 05303ab3af7a30ddc9f134e0f5e60452ae3d8d64 Mon Sep 17 00:00:00 2001 From: Ino Date: Thu, 6 Mar 2025 15:15:45 +0900 Subject: [PATCH] =?UTF-8?q?=EC=BD=94=EC=9D=B8=20=EC=9C=84=EC=B9=98=20?= =?UTF-8?q?=EB=B0=8F=20=ED=9A=8C=EC=A0=84=20=EC=86=8D=EB=8F=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Script/DropItem/DropItem.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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;