Hello.
Before watching the Code Monkey’s solution i’ve tried to challenge me to find the solution myself.
So i said me why don’t mimic move action with getLenghtPath.
For me it can work but I have a problem to transform targetUnit in something with gridPosition.
Here is my code :
int pathLenghtMultiplier = 10;
if(Pathfinding.Instance.GetPathLenght(unitGridPosition, targetUnit)> maxShootDistance*pathLenghtMultiplier)
{
continue;
}
It’s just to make advance the science, don’t worry but I love go in the crossroad
Thanks.
François