Attack range variable vs acceptance radius in ai move to node

I followed the tutorial and it works well but I noticed that if attack animation finished the spider will move a little closer to player and then attack rather than just continue attack in same location.

I feel it’s related to this “acceptance radius” in “ai move to” node.
But if I put attack range variable into acceptance radius, it just moves to player but does not attack (like attack range is not close enough).

image

But if I subtract some value from attack range then it works.

What would be the reason for that?

Floating point numbers are by nature imprecise, what this ultimately means is that movement is most likely to stop just before the acceptable radius keeping the alien outside of its attack range. Which is why you trick of using an offset works.

Is there some other number that is more precise or this trick with offset is the way to go?

Offset is the way to go.

Thank you

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms