How I fixed my enemy not moving on waypoints

cud_s06_move_enemy_on_path

#1

I did everything in the video, and my enemy didn’t move.

I output the transform.position to the log, and I noticed the Z axis was set to 5, and I’m not sure how that happened.

Once I updated the Z axis on all of my waypoint prefabs to 0 it moved as expected.

Hopefully this will help anyone else who encounters this issue.


#2

Happened the same thing with me. Had to debug.log each and every step and found out that my Z was -2 for the Path(0) and the first waypoint was -2 . I wish I had seen your comment before i spent almost half an hour down the rabbit hole.


#3

i was stuck for 2 hours on this problem until i read this and never have felt more stupid.
That’s why he always says to reset when creating a new game object.


#4

@Muneeb_Saeed, don’t feel stupid. I did reset my transforms, but somehow I still messed them up, and I couldn’t tell you how I did it.

If anything it’s a learning mistake, and I doubt you’ll make it again :wink: