Home Unreal Engine

Get Path Cost Vs. Get path length?

polycounter lvl 12
Offline / Send Message
Cglewis polycounter lvl 12
Hey guys, 

I Have a quick question....what is the difference between "Get Path cost" and "Get Path Length"...
I am trying to figure out the distance between my "AI" and the player.
Get Path Length returns a value of 0
Get path cost returns the distance between the 2 entities

While it is effectively working i would like to know the difference between the two nodes 

Replies

  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    "cost" can be added to nav volumes, to tell the ai where is it harder to go for him, or where he shouldn't go if possible. Imagine hard terrain for example. You would put high cost on that so the ai would try to avoid going there if he has an another choice. 

    So I don't think you should use this for calculating the distance between 2 things. A more standard way would be, to get both entities world position, substracting from each other, and get vector length from that. Or there is the distance to node.
  • Cglewis
    Options
    Offline / Send Message
    Cglewis polycounter lvl 12
    @Obscura
    Thank you for clearing that up I really appreciate that :) i had no idea you could give a cost to terrain that kinda opens some really cool doors :)
    Ill definitely rework my bps now that i know that :)
Sign In or Register to comment.