Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

[Unsolved] Projectile Issue...

$
0
0
I've been trying to code a projectile for my 2D game that explodes when it reaches the point the mouse was when it was launched, but can't seem to get the timing right for the explosion. I've been using this code for the projectile so far:
Code (csharp):
  1.  
  2. using UnityEngine;
  3. using System.Collections;
  4.  
  5. public class ShockwaveblastScript : MonoBehaviour {
  6.     public int speed = 4;
  7.     public GameObject shockwave;
  8.     Vector3 object_pos;
  9.     Vector3 mouse_pos;
  10.     float lifespan;
  11.     public...

[Unsolved] Projectile Issue...

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>