in triggers UI - Pathing you can draw lines between 2 points with an arrow indicating a direction.
if this doesnt fit your description, well what is a line? a line are alot of points. you can use decals to make one
That is to be expected. The path is generated based on the pathfinder system used by SC2. Like most real-time path finders it makes a compromise between best path and computation speed. As such the results it generates are sub-optimal but close enough to optimum that humans seldom notice.
If you move zerglings straight through a path which is near a lot of complex pathing (single cliff points, buildings etc) you will notice them snaking from side to side to some degree even though the mathematically provable optimum path would be a straight line. The difference however is so small that they would probably arrive close behind units taking a straight line.
Also the actual problem here is that you are making a line to an unpathable point (inside a supply depot). It tries to go near it but fails so straight lines into it. You will get the same response from units which will eventually sit on the edge of the supply depot because they cannot move into it.
If you want to link buildings together (like in the image) then you may want to use something that does not involve the path finder since the building is probably in a straight line anyway. Instead I would imagine some form of line actor being more appropriate as that would always be a straight line from source to destination. Pathing based lines are meant for graphic representation of movement orders such as in use by Heroes of the Storm to show how your hero will move to get to a distant point.
I forgot about stuff like that. I had a similar problem where I found that calculating pathing cost inside of a building (endpoint) winds you up with huge numbers :)
Is there a way to draw a line between two units? ..and perhaps make an arrow pointing/an actor traveling along said line?
Thanks
@Sapphire_united: Go
in triggers UI - Pathing you can draw lines between 2 points with an arrow indicating a direction. if this doesnt fit your description, well what is a line? a line are alot of points. you can use decals to make one
I am trying the following
I cant for the life of me get it to work., it just doesn't show up in game. Selected unit [1 and 2] are the x and y positions of two units.
you havent set a target point (source and destination point must be set)
Set Path Display Source Point Path Display: Last Path Display Created Source: Selectedunit Index 1: 1
Set Path Display Destination Point Path Display: Last Path Display Created Destination: Selectedunit Index 1: 2
I did indeed set them, they just didn't copy right when I posted.
Here's a test map I made where it works fine.
Thanks!
I got it working.
For some reason setting the destination to a point rather than a unit didn't work.
Edit:
For some reason I can't delete just a single path, and the paths seem to use more than 1 point to get to their destination instead of just A - B?
Here is the path "bending" I am experiencing
That is to be expected. The path is generated based on the pathfinder system used by SC2. Like most real-time path finders it makes a compromise between best path and computation speed. As such the results it generates are sub-optimal but close enough to optimum that humans seldom notice.
If you move zerglings straight through a path which is near a lot of complex pathing (single cliff points, buildings etc) you will notice them snaking from side to side to some degree even though the mathematically provable optimum path would be a straight line. The difference however is so small that they would probably arrive close behind units taking a straight line.
Also the actual problem here is that you are making a line to an unpathable point (inside a supply depot). It tries to go near it but fails so straight lines into it. You will get the same response from units which will eventually sit on the edge of the supply depot because they cannot move into it.
If you want to link buildings together (like in the image) then you may want to use something that does not involve the path finder since the building is probably in a straight line anyway. Instead I would imagine some form of line actor being more appropriate as that would always be a straight line from source to destination. Pathing based lines are meant for graphic representation of movement orders such as in use by Heroes of the Storm to show how your hero will move to get to a distant point.
@ImperialGood: Go
I forgot about stuff like that. I had a similar problem where I found that calculating pathing cost inside of a building (endpoint) winds you up with huge numbers :)
How would I go about setting this up with actors?
Thanks