This thread helped me a lot with my npc pieces.
(Solved) Pathfinding animation problem in 8 directions - How do I…? - GDevelop Forum
Unfortunately for me I’m using a different sort of movement than pathfinding but I was still able to use the formula to make it into something workable in my game. If you are using regular pathfinding you can probably get all your answers here.
@Keith_1357 has always helped me with my pathfinding questions and I consider him something of a pathfinding genius, considering his amazing samples and work he’s done with it. He can surely provide more knowledge for you if you still have questions.