Commit 4a3b7dea by Philipp Adolf

Make rockets spawn in front of turrets

parent ee238678
......@@ -27,7 +27,7 @@ public class Turret : MonoBehaviour
{
if (currentRocket) return; // do not shoot another rocket when there is one already flying.
currentRocket = (GameObject.Instantiate(rocketPrefab, transform.position, transform.rotation) as GameObject).GetComponent<Rocket>();
currentRocket = (GameObject.Instantiate(rocketPrefab, transform.position + 1.5f * (transform.rotation * Vector2.up), transform.rotation) as GameObject).GetComponent<Rocket>();
currentRocket.setTarget(target);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment