Example #1
0
    private void Shoot()
    {
        GameObject   bullet  = Instantiate(playerBullet);
        PlayerBullet PBullet = bullet.GetComponent <PlayerBullet>();

        bullet.transform.position = bulletSpawner.transform.position;
        Vector3 playerRot = transform.eulerAngles;
        Vector3 cameraRot = PlayerCamera.transform.eulerAngles;

        bullet.transform.rotation = bulletSpawner.transform.rotation; //this.gameObject.transform.rotation;
        PBullet.OnceInstantiated();
    }