Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public GameObject pinball;
- private Rigidbody rb;
- void Start()
- {
- rb = pinball.GetComponent<Rigidbody>();
- }
- void Update ()
- {
- GameObject clone;
- if (Input.GetKeyDown ("space"))
- {
- clone = Instantiate(pinball, transform.position, transform.rotation) as GameObject;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement