You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This does only set another node as current if the h-cost is also lower not just the f-cost - also the first if does not make much sens since it can be rewritten as a single <=. In the respective video you use another version (https://youtu.be/mZfyt03LDH4?t=331) that might actually work because of associativity rules of || and && essentially leading to something like "lower f OR (equal f AND lower h)".
I was implementing a-star in plain C for fun after watching your videos and that bit confused me because I of course though I made an error somewhere else. Thanks for the inspiration - your videos are great.
The text was updated successfully, but these errors were encountered:
Pathfinding/Episode 03 - astar/Assets/Scripts/Pathfinding.cs
Lines 29 to 32 in b938872
This does only set another node as current if the h-cost is also lower not just the f-cost - also the first
if
does not make much sens since it can be rewritten as a single<=
. In the respective video you use another version (https://youtu.be/mZfyt03LDH4?t=331) that might actually work because of associativity rules of||
and&&
essentially leading to something like "lower f OR (equal f AND lower h)".I was implementing a-star in plain C for fun after watching your videos and that bit confused me because I of course though I made an error somewhere else. Thanks for the inspiration - your videos are great.
The text was updated successfully, but these errors were encountered: