Its so cool watching the NPC watering the plants by himself. I need to look into A*, for the simple games I made I could always program the AI myself but maybe its time for a change.
Great work as always! I had the animation flickering problem with A* as well. It was mostly (still flickers sometimes) resolved when I used aiPath.desiredVelocity to set the animation. May I ask what you ended up doing to solve that?
Thanks Epiphany! :) I tried using aiPath.desiredVelocity as well but what worked the best for me was not to apply a force but move the rb by using MovePosition and then applying the lookdirection manually (using a custom round and checking in wich direction the rb actually moves) to the animator of the npc. This then triggers the needed animation. The acutall flipping of the rb i simply apply by checking if the current look direction on the x axis != 0 and setting the localScale.x of the transofrm to -1 or 1 (CurrLookDirection.x < 0 ? -1:1) If you need more (code) detail I can try to upload a sample of my code :)
@@asciim0e880 Thank you very much, this really helped! I am using aiPath for the actual movement as well because it is compatible by default with the local avoidance and other features of A*. I guess more control you take over, better you can adjust to these bugs, I will try doing it with the rb. :) You're so kind man, it would actually be great to see how you handle that lookdirection vector. Here is mine btw (stripped unnecessary code): gist.github.com/ymansurozer/76246e138a2347ffd32e91afe2e1cd80
Thanks for the support DevNoob! I am actually having some trouble with the A* pathfinding and might not use it for my NPC after all :D But I'll use it for sure for my enemies inside the mine tho!
Very cool to see the NPC walking around the world.
Thanks Skeffles! And indeed it is :D
Its so cool watching the NPC watering the plants by himself. I need to look into A*, for the simple games I made I could always program the AI myself but maybe its time for a change.
Thank you tauheed!
Honestly both is great. If the A* fits your need go use it if not just code your own algorithm. :)
Great work AsciiM0e! You did really well on the Npc
As always thanks Yousif :)
Great work as always! I had the animation flickering problem with A* as well. It was mostly (still flickers sometimes) resolved when I used aiPath.desiredVelocity to set the animation. May I ask what you ended up doing to solve that?
Thanks Epiphany! :)
I tried using aiPath.desiredVelocity as well but what worked the best for me was not to apply a force but move the rb by using MovePosition and then applying the lookdirection manually (using a custom round and checking in wich direction the rb actually moves) to the animator of the npc. This then triggers the needed animation.
The acutall flipping of the rb i simply apply by checking if the current look direction on the x axis != 0 and setting the localScale.x of the transofrm to -1 or 1 (CurrLookDirection.x < 0 ? -1:1)
If you need more (code) detail I can try to upload a sample of my code :)
@@asciim0e880 Thank you very much, this really helped! I am using aiPath for the actual movement as well because it is compatible by default with the local avoidance and other features of A*. I guess more control you take over, better you can adjust to these bugs, I will try doing it with the rb. :) You're so kind man, it would actually be great to see how you handle that lookdirection vector. Here is mine btw (stripped unnecessary code): gist.github.com/ymansurozer/76246e138a2347ffd32e91afe2e1cd80
cool stuff bro! good luck! i'm also working on a game btw
Thank you Vlad!
Cool stuff, NPC ai is very good..
Thanks Pix!
First! =) =) =) I used A* quite a bit. It's incredible
Thanks for the support DevNoob!
I am actually having some trouble with the A* pathfinding and might not use it for my NPC after all :D
But I'll use it for sure for my enemies inside the mine tho!
@@asciim0e880 The biggest issue I had with A* was group pathfinding but that was all for my purposes.
But keep up the good work! :D