Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class SpawnBullet : MonoBehaviour
- {
- [SerializeField]
- private GameObject Bullet;
- [SerializeField]
- private GameObject Camera;
- private void Update()
- {
- if (Input.GetKey(KeyCode.Q))
- {
- Instantiate(Bullet, Camera.transform.position, Camera.transform.rotation);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement