Enemy projectiles not working anymore

Implemented the particle effects and it works perfectly for the player, but once I tried using it for the enemy projectiles, the projectiles stopped colliding with the player ship. Now no matter what I use, the enemy projectiles just shoot straight through the player ship, but if the player ship collides with the enemy, everything works as it should. Any ideas?

Hi Jeff,

Collisions happen between colliders. Do the enemies’ lasers have got a collider component attached? Does the player have got a collider attached?

Also check the spelling of the collision and trigger methods in your code. C# is case-sensitive. Remember you can also look at the lecture code changes via the link in the Resources of each lecture.

I solved the issue! It took several hours of going through each script, but it turns out, I had to delete both projectile prefabs and redo them. Not quite sure why the enemy stopped working before, but it seems that creating new prefabs solved the issue.

Good job on fixing the problem! :slight_smile:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms