Error CS1501, Projectiles spawning.

My bullet projectiles are being fired from the turret, and ending up spawning ontop of another, furthermore they don’t move. I’ve tried adding Physics.IgnoreCollision(bullet.collider);

However that generates the error; error CS1501: No overload for method IgnoreCollision’ takes1’ arguments

void Update(){

 TargetEnemy(); // update the selected target and look at it

if (selectedTarget){ // if there's any target in the range...

transform.LookAt(selectedTarget); // aim at it

if (Time.time >= shootTime){ // if it's time to shoot...

Rigidbody bullet = (Rigidbody)Instantiate(bulletPrefab, bulletSpawn.position, bulletSpawn.rotation);


Physics.IgnoreCollision() takes 2 or 3 arguments.

  • Physics.IgnoreCollision( colliderA, colliderB ) : colliderA and colliderB will not collide
  • Physics.IgnoreCollision( colliderA, colliderB, false ) : colliderA and colliderB will collide

Physics.IgnoreCollision(bullet.collider) is incorrect, you need to define what collider the bullet will ignore.