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:
[Unsolved] Projectile Issue...
Code (csharp):
- using UnityEngine;
- using System.Collections;
- public GameObject shockwave;
- Vector3 object_pos;
- Vector3 mouse_pos;
- float lifespan;
- public...
[Unsolved] Projectile Issue...