private void Shoot() { // Get reusable bullet object from Bullet Pool GameObject bullet = bulletPool.GetBullet(); //Set Bullet attributes bullet.transform.position = cachedFirePointTransform.position; bullet.transform.rotation = cachedFirePointTransform.rotation; Bullet b = bullet.GetComponent <Bullet>(); b.SetDirection(cachedFirePointTransform.up); b.SetSpeed(bulletSpeed); b.SetDamage(1); b.SetHostility(false); bulletPool.PlaySound(transform.position); animator.SetTrigger("thePillFire"); //Activate bullet object (must happen last) bullet.SetActive(true); //Instantiate(bulletPrefab, cachedFirePointTransform.position, cachedFirePointTransform.rotation); //Rigidbody2D rb = bullet.GetComponent<Rigidbody2D>(); //rb.AddForce(cachedFirePointTransform.up * bulletSpeed, ForceMode2D.Impulse); }