Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public GameObject ball;
- // Use this for initialization
- void Start () {
- }
- // Update is called once per frame
- void Update () {
- if (Input.GetKeyDown(KeyCode.Space)) { //have we pressed the key down if so the intantiate the object.
- Instantiate (ball, new Vector3(Random.Range(0,0),3f,0),Quaternion.identity);
- }
- }
Add Comment
Please, Sign In to add comment