Hi, I’m currently working on a TD Game.
I have a basic setup, but a big problem right now.
The green area is the starting area of the enemies. The red area is the target.
When I block the path (with the blue towers), instead of not giving any path it gives the direct path to the target (green line). Does anyone had similar problems? Because I’m running out of ideas…
Thank you in advance.
EDIT:
I don’t know if that got clear, but generally it’s working. It’s just that one case that I can’t explain.
Hi
If it cannot find a path it will generally try to find the path to the closest node it can reach. However due to a bad default setting in previous version of the system ( 3.3 and down ) it would seem like it took a direct route.
The relevant setting is the Seeker -> Start End Modifier -> End Point. Try to set it to ClosestOnNode instead of Original as it is set to per default.
Thank you for your answer.
This unfortunately didn’t solve the problem entirely. Now he doesn’t make it to the end, but I was hoping for an error, so I can see if the player is blocking the way to the end.
Am I missing something, because this shouldn’t be as hard, is it?
Hi
If you want to decrease the distance which is considered an error. Decrease A* inspector -> Settings -> Max nearest node distance.
In your case I think this should be set to about the size of a single node.