Enemies float above game board and shoot towards the camera. Cannot block path

Issue #1: When i play the game the enemies are not starting at the startCoordinates and the path they follow appears to be in the z axis and not the y. I am fairly confident i have follow the code exactly as i have been over it multiple times (this path finding section is not easy to follow). I am wondering maybe because i created empty game objects to put my tiles in rows this may have something to do with it but am not sure.

Issue #2: l can only place 1 tower on the board. Even if i do not block the path. Also, when i block the path the new path isn’t created.

Any help would be great. I have tried comparing to the git for each lecture but the git seems to have other lecture’s code that may not be implemented yet included.

I think I got the enemies following the right path now. I had GridManager/GetPositionFromCoordinates passing in a position.y = coordinates.y * unityGridSize. It should have been position.z.

Still haven’t figured out why the towers are not blocking the path.

Nevermind…found my issue. Towers were not blocking path because my GridManager/GetCoordinatesFromPosition still had Mathf.RoundToInt(transform.position.x / unityGridSize) and i didn’t remove the “transform” bit. Oops. :grimacing:

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

Privacy & Terms