Guest User

Untitled

a guest
Oct 23rd, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. public GameObject ball;
  2.  
  3. // Use this for initialization
  4. void Start () {
  5.  
  6. }
  7.  
  8. // Update is called once per frame
  9. void Update () {
  10. if (Input.GetKeyDown(KeyCode.Space)) { //have we pressed the key down if so the intantiate the object.
  11. Instantiate (ball, new Vector3(Random.Range(0,0),3f,0),Quaternion.identity);
  12. }
  13. }
Add Comment
Please, Sign In to add comment