MIRV Hotfix

Submunitions weren't actually ejecting at the right point, nor were the parent missiles exploding properly
This commit is contained in:
Reinier Vens 2021-01-28 03:04:37 +00:00
commit 4c0038830b
5 changed files with 19 additions and 94 deletions

View file

@ -97,7 +97,8 @@ public class GuidedProjectile : MonoBehaviour
for (int i = 0; i < Children; i++)
{
var child = ChildProjectile.Instantiate<GuidedProjectile>();
child.StartPosition = child.transform.position = t.position;
child.transform.position = t.position;
child.StartPosition = StartPosition;
_children.Add(child);
var randomDirection = normalize(Random.insideUnitCircle);
var perpendicularRandom = randomDirection.x * right + randomDirection.y * up;