Strange enemy ship behaviour

Hi there! I wonder if somebody can help me to resolve a strange behaviour of the enemy ship. Long story short, as soon as I implement all the logic and scripts same like on the video, the enemy ship doesn’t shoot any projectiles it dissappears instead as soon as it instantiates in the screen

Thank you in advance!

Hi Vadym,

Welcome to our community! :slight_smile:

First of all, start your game, and check the Hierarchy when the player disappears. If the player isn’t there anymore, maybe he shot himself. Make sure that the lasers do not get instantiated in the player’s collider.


See also:

It seems like everything is set up following Gary’s instruction but problem is just with enemy, it doesn’t concern the player prefab. I mean as soon as I click UseAI checkbox, enemies start disappearing in playmode just straight after they appears on the screen and no EnemyProjectiles at all

A lot happens within milliseconds in Unity, and we often cannot see what is really going on. Did you check with Debug.Logs what I suggested above?

in Debug process I found that I didn’t save EnemyProjectile layer order and it was assigned as Player layer that’s why it destroys itself:))))) Thanks a lot for letting me remind myself about layers

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

Privacy & Terms