My wave is not working

Hello.
If i make a new path my ships are not following they just got instantiated to the left side of the screen and dont move just shoot.If i try to move the enemy while the game is running from the scene manually they are moving slowly back to the point where they instatiated.

I try to copy paste the working paths they dont work my only four wave ( wave1 wave 2 wave3 wave4 )
are working only.If i change the path to one of these they work example wave1.If i copy paste wave1 and give new name new waypoints they dont work.If i create a new path they dont work.

Wow i solved but dont understand why is working.I just changed the new path transform position X,Y,Z to 0 and is working.

Hi Shaktillar,

Check your code. The part which increments the waypointIndex is wrapped in an if-statement. The condition gets evaluated to true only if the position values are equal. If your waypoint is at, for example, z = 1 and your enemy at z = 0, the condition will never get evaluated to true, and the enemy won’t move anymore.

Maybe you fixed that issue when you changed the transform.position of the new path. :slight_smile:

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

Privacy & Terms