- Home /
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.
Answer by clay · Mar 13, 2011 at 08:29 PM
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 ins$$anonymous$$d of writing an answer. There is a small "add comment" link just below your question.
did see it. isnt a straight line nothing more then a path to begin with? yes, it uses path finding. target used to be a gameobject. now itneeds to be what i guess we can all a node on the grid... you choose the node inside unity ins$$anonymous$$d of inside the code.but the targetting needs to happen in the code ins$$anonymous$$d of inside unity
i guess its breath first path finding.. which is done. i just need something to make the vehicle find the path to the target.
Your answer
Follow this Question
Related Questions
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
Grid-based path-finding, similar to Legend of Grimrock/Eye of the Beholder... 2 Answers
ai pathfinding project getting started scene problems 1 Answer
Create spaceship attack logic [and other logic eventually] 1 Answer
Path system or Predetermined paths for Camera Fly-throughs / Ladder climbing / etc 1 Answer