- Home /
Aron Granberg's A* seeker goes back and forth if a smooth modifier is attached.
Hi, I'm currently using Aron Granberg's A* plugin for my game. This is a copy of the question I posted on Aron's web. I dunno whether the forum is a proper place to ask this. But here goes.
My game is a 2D one and using 1 pixel / point ratio (ie. ortho camera with the size of 384). I'm using the A* plugin for the enemy's pathfinding when it is chasing the player. Here are some of the issues I've encountered so far:
Using a grid system with 1 point node size, width 1024 and height 768 is painful to the machine. And I'm not talking about the mobile devices that will be my target platforms. But my development rig. :| I tried size 2, width 512, height 384, but it is still heavy. Size 4, and 8 is still pretty slow. Size 32 is pretty okay, but the nodes were all wrong.
In the end I skipped grid, and use point system. Now, it worked fine and I can get it running. The enemy chasing pathfinding worked fine. Then an issue shows up. If I use the simple smooth modifier, it goes back and forth in the first segment of the path (ie. between node 0 and 1). But if I don't use the modifier, at the end of the path, it will clip the path ignoring the last node and goes straight to the target even thought there's a collider in between path that supposed to block it.
Can you help me here, please? Thanks a lot in advance.
BTW, a little more information. I'm using the Seeker and AIPath script from the package itself for the AI. I only changed the transform.LookAt() line in the RotateTowards() function by multiplying it with the inverse of LookAt(Vector3.up * -1, Vector3.forward) with the down vector as my game's forward vector and the forward as my up vector. Perhaps this is just a matter of the wrong parameter settings. Any body has any tips about using the Simple Smooth $$anonymous$$odifier? The documentation didn't give me much insight. And trying to read the whole code is too tedious and takes much longer time.
Thanks.
Your answer
![](https://koobas.hobune.stream/wayback/20220613104730im_/https://answers.unity.com/themes/thub/images/avi.jpg)