Advertisement
benimaru

Leefix

Jun 9th, 2015
449
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.31 KB | None | 0 0
  1. public GameObject pinball;
  2. private Rigidbody rb;
  3.  
  4. void Start()
  5. {
  6.     rb = pinball.GetComponent<Rigidbody>();
  7. }
  8.  
  9. void Update ()
  10. {
  11.         GameObject clone;
  12.  
  13.         if (Input.GetKeyDown ("space"))
  14.         {
  15.         clone = Instantiate(pinball, transform.position, transform.rotation) as GameObject;
  16.         }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement