S
S
schroeder2013-11-09 22:45:41
Counts
schroeder, 2013-11-09 22:45:41

Working with the graph in the object inspector?

Hello everyone, such a question:
I need to impose a “grid” on the city, namely on the roads, along which car bots will then drive. First I screwed “itween” and cars from UnityCarsPro, wrote the logic of car control, everything works.
But... I got a simple closed path. If I need to make a road with intersections and then, for example, randomly, decide where to go next (left, right, straight), this approach will no longer work. Reason: now the road points are stored in an array and the path itself is easily done in the editor by simply creating some object on the stage (I have a sphere) and dragging it to the array (in the object inspector). Thus the car travels from one sphere to another.
Now I need another data structure, namely a graph (because one point on the route can have several children). I want to keep the simplicity of creating a path for cars. In theory, the same principle would fit as the creation of objects on the stage (the left window, where I can place one object in another). An internet search unfortunately turned up nothing.
Can you tell me some project, asset, package for such a case?
Thanks in advance

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question