LAPTOP-OM1V99U2\永远de小亡灵 8 miesięcy temu
rodzic
commit
13b14d986e

+ 4 - 1
ActionTowerDefense/Assets/Resources/Prefab/TowerBullet.prefab

@@ -4964,7 +4964,10 @@ MonoBehaviour:
   trackTarget: {fileID: 0}
   isBack: 0
   stayTime: 0
-  toFloat: 0
+  canTransmit: 0
+  haveTransmit: 0
+  transmitTime: 0
+  portalsController: {fileID: 0}
 --- !u!54 &8541051486027365006
 Rigidbody:
   m_ObjectHideFlags: 0

+ 1 - 0
ActionTowerDefense/Assets/Scripts/Bullet.cs

@@ -122,6 +122,7 @@ public class Bullet : MonoBehaviour
         if (isTrack && trackTarget != null && !trackTarget.isDie && trackTarget.gameObject.activeInHierarchy)
         {
             Vector3 tarDir = (trackTarget.beSearchTrigger.transform.position - transform.position).normalized;
+            tarDir.z = 0;
             transform.right = Vector3.Lerp(transform.right, -tarDir, 0.2f);
             rb.velocity = Vector3.Lerp(rb.velocity, speed * tarDir, 0.2f);
         }