Pathfinding acting abnoramly

bug
pathfinding

#1

Okay, So I’m trying to get a path from a cop car, to a players car. The cop car runs all the nodes as it should but, the nodes are horrid.

This is the part in my script where I request the path:
Overall target is the players car and origin is the cop car

local pathSettings = {["AgentRadius"] = 10,["AgentHeight"] = 5}
local path = pfs:CreatePath(pathSettings)
path:ComputeAsync(Origin.Position+(Origin.Velocity*.3),OverallTarget.Position)
local latePath = path:GetWaypoints()

Example:

I’m quite confused on why its comfortable going so close to the wall yet not comfortable going between the gap

I’ve tried making the wall not climbable and I end up with this:


#2

You’re probably going to have to use a custom pathfinding function. Roblox’s is still extremely unreliable.

I’d google it. There’s plenty of resources on doing that. Many people use the A* pathfinding algorithm to move things with nodes, and that might work here.

Good luck :slight_smile:


#3

Hehe, that’s funny… No, silly Roblox, cars can’t jump!

Can you put an invisible wall all around the top of the parking garage?

I wish there was a way to setup your pathfinding map first. For example, I’d like to be able to choose what parts to add (streets only for cars). I’d like to manually make links like those seen in the image for jumps but include additional data (for things like interactions and teleporters). Modifying the cost for traversal on some parts would be good too (sidewalks can be driven on, but should only be done when absolutely needed). Additional user options like turning radius, can jump, and jump height would be nice too. Time based pathfinding like spinning death blocks in obbys, timed doors, would be nice. Sequential pathfinding like you have to grab a key before you can open a door before you can walk through it would be nice too. But alas!


#4

I know that adjusting the path settings itself can result into some whacky generated paths, doesn’t make sense why nodes would be on on top of those thin walls though when you clarified the radius to be huge.