grid pathing system

hey guys! i got a bit of a weird one. i have created a grid and i managed to create a code that allows the user to choose a start and an end inside the grid. i made a simple vehicle that normally is only able to follow a specified target. what i need now is for that vehicle to find its target ( the start and end). then it needs to follow that path then turn around and stop right back where it started at start.

originally my idea was to just switch the game object target with the code for starting and end when i realized i didn't know how to do that...the code is way too long to throw in unity answers.

am i on the right track or is their a better way?

Perhaps you could tell us which pathfinding library you are using, that would make things a lot easier.

–

1 Answer

1

really? did i do a bad job explaining or something?

I'd say it's a bit unclear. Start and end, is it a straight line or is it a path? Do you use pathfinding? Is that what you mean by "follow a specified target"? What is "target", is it a point in the grid or some object that is located on the grid? And please answer comment replies instead of writing an answer. There is a small "add comment" link just below your question.

–