Broken Pathfinding

Now that we removed the Serialized List of waypoints, and add the SetWaveConfig function, my pathfinding stopped working…
I had the enemy spawning 5 enemies and moving along the path correctly, but when we changed everything over in the last lesson, and added the set function, my enemy stills spawns 5 instances, but they all just sit at the first waypoint in the path…

I even went through, and copy pasted the code from the resources (after Id been trouble shooting for over an hour) and recreated a new Enemy prefab and attached everything as was shown earlier. My enemies still just stand still at the spawn point… this is fairly
frustrating.

Hi Simon,

I don’t know anything else about your project except for the information you provided here but try to replace Vector2.MoveTowards with Vector3.MoveTowards in the EnemyPathing class.

Hi Nina…
I realize I posted no info… I had been going over the code for a while, and at that point it was completely destroyed… and I was a little frustrated, so it was a bit of a vent… Sorry.

That being said, I did end up going back and completely rewatching the lessons and rewriting the scripts for the Enemy Pathing, and Wave Config file, and I am back to the point, where things stopped working… I have made a back up, just in case, and will attempt the lesson again, if I am still having issues, I will try to respond in a more constructive manner. Thank you for the attempt at assistance, however, I don’t believe using a Vector 3 would have helped, as I had read the discussion in the script changes around the z-Axis/Vector2/Vector3 issue, and had ensured I had my Z-axis reset, but I will never know now. :slight_smile:

I seem to have been successful in my new attempt. Not sure where I went wrong before, but thanks.

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

Privacy & Terms