Hey, trying to instiate a rocket, but at the moment, it’s just spawning hundreds and hundreds of rockets without me even pressing the mouse, it nearly crashes unity if I don’t stop playmode.
using UnityEngine;
using System.Collections;
public class RocketLauncher : MonoBehaviour {
public GameObject thingToSpawn;
void Update () {
if(Input.GetKeyDown(KeyCode.Space));
{
Instantiate(thingToSpawn, transform.position, transform.rotation);
}
}
}
The problem with the flight mode is that I’ve got a small script setup, it banks left and right with ease along the Z axis, and it rotates on the X forwards and backwards, but if I rotate it along the Z 90degreas, it won’t rotate on the X at all.
(Using relative torque.)