Path visualisation

Hello, i am thinking about buying your asset, and i have a question:
Is it possible to create a visual path using A * Pathfinding? Do i need ALINE asset for this? I need to display the path as in the video below, are there any tips?

  1. https://puu.sh/GOQvM/d92363100e.mp4
  2. https://puu.sh/GOQBz/b65c451b59.mp4

Hi

This is orthogonal to pathfinding. There are many plugins to Unity for drawing lines or dotted lines given a list of coordinates (including ALINE), you can use any one of them (or Unity’s built-in LineRenderer component).

Thanks for fast reply, this is good news.

Hello again! Today i buyed Pro version, and i have question about performance.
see this my little demo: https://puu.sh/GQpkk/11b0781872.mp4
Why if i click in house - path calculate so long? this long time only if i click on second floor from street, if i click on 1st floor - calculating very fast.

my code is very simple:

		if (Input.GetMouseButtonDown(0))
		{
            if(Physics.Raycast(cameraMain.ScreenPointToRay(Input.mousePosition), out RaycastHit hit))
			{
                seeker.StartPath(transform.position, hit.point);
            }
		}

Update:
I found problem is to long calculating, if i set penalty, long path calculate too slow, Why?

Hi

Sorry for the late answer.
If the penalty is very high then the A* algorithm needs to search a lot more nodes to be able to guarantee that it finds the optimal path.

1 Like