Hello! I’m trying to make an NPC system that will pathfind effectively, and while the system I’m currently using works well, the NPCs do not move in a satisfying way.
In short, they take corners too sharply, this looks strange and also makes them prone to getting stuck.
What I’m trying to achieve is a way to smooth the path’s corners with some sort of curve, I’ve seen posts on this topic, (such as this) but I’ve been having a hard time wrapping my head around it.
I’m using the NoobPath module, and I’d like to keep using it if possible.
This is currently the result I’m getting when my NPCs take corners.
If anyone has any ideas/solutions, I’d appreciate it, I’m not the best when it comes to math and I’m extremely new to pathfinding in general, but I’d like to understand how to do these things for the future, but if this is a stupid question on my end, sorry!
try enabling PathfindingUseImprovedSearch in workspace settings
maybe some work around with parts to not allow npc walk close to some corners, yet might take some time since you have to set them manually everywhere
also you can try playing with AgentRadius setting
why not use the source you’ve provided? You can still use AI (chatgpt or deepseek) to help implement given solution.
Reminder that the goal of pathfinding is to find the shortest path from point A to B.
Pathfinding is working as expected here because it is finding the shortest path by going as close to the corners as it can.
You may have to add additional hitboxes around the path’s edges that make it un-navigable.
Also don’t do this. Like, at all. If it’s not wrong, it won’t be optimal at all. You also shouldn’t get AI to create things for you, merely suggesting if at all is all it should be used for. Always go to the forums first, then google, and AI as a very last resort.
Who says creating things? In my latest experience deepseek (not speaking of chatgpt since its blocked in Russia) has surprisingly shown me a good amount of well written scripts if you work with it properly (never asked to create something, but change/or combine something together)
I was skeptical of using AI, but when i started working on my project around 2 months ago i decided to try it once, and it really did work out well (maybe 50% of what i asked was done well, i also did my own changes since ofcourse it was never perfect)
Well, it’s been a few days, and after trying all three of these options, none seemed to have worked.
I first tried to use the post that I linked as a solution, but it seems their pathfinding script uses the bezier curve to animate the npc along the path rather than using standard humanoid movement, which is not what I was after.
I tried to use PathfindingUseImprovedSearch, but it seemed to really do nothing at all.
And I did try both AIs as a last ditch effort, but they did not produce the results I was looking for either.
If you or anyone else has any ideas on how to do something like this, feel free to give me suggestions because I’m truly stumped as of right now, but thanks for trying regardless.
I think you can make a bezier curve between the last and next point in a turn, and the turn point is the intermediate one in the curve idk what it is called
Or just decrease the npcs friction by lowering its mass and make it walk like the floor is ice so the movement is smooth