I’ve been fighting with this for hours, I’m following the “Getting Started” tutorial, and StartPath() always give me a length of 1, I’m not sure what I’m doing wrong.
I’m working in 2D and using 2D physics.
Here’s a screenshot of my Pathfinder and graph: http://prntscr.com/2nis5f
Here’s a screenshot of my enemy unit (in gold) and his seeker. http://prntscr.com/2nishz
I’m trying to get the golden enemy unit to move to the blue player unit, the black objects are walls, they do have rigidbodies and the graph is detecting them as far as I can see.
Here’s screenshot of my code. http://prntscr.com/2niumu
I find the player with “GameObject.FindGameObjectWithTag(“PlayerTag”) in Start();”
Then I get the path with “_seeker.StartPath(transform.position, _player.transform.position, doneFindingPath);”
But the console always says that there’s 0 nodes and the length is 1, I have code for moving between the nodes below but he just moves one node and stops.
Where did I screw up?
Thanks in advance.