In the Vehicle class you calculate the target position outside the if (distance > p.radius), but actually you apply seek(target) only if in that condition is true, could you save some calculation by moving the logic for finding the target within the if (distance > p.radius) block?
Why did you choose to put that logic outside the conditional? Just for debugging reasons or there's something else useful you can do with that?
I have a question about NOC_6_05_PathFollowingSimple
In the Vehicle class you calculate the target position outside the
if (distance > p.radius)
, but actually you applyseek(target)
only if in that condition is true, could you save some calculation by moving the logic for finding the target within theif (distance > p.radius)
block?Why did you choose to put that logic outside the conditional? Just for debugging reasons or there's something else useful you can do with that?