Fastest route from point A to B

Might sounds stupid i understand, is possible to calculate the fastest route from part A to part B. For example like a GPS the car knows the best way from your start location to your destination.

I understand it might be very complicated but worth a try to be fair.

(Not the best photo,

7 Likes
2 Likes

The shortest path between point A and point B is a straight line

5 Likes

If there is anything in the way.

3 Likes

This isn’t for a player or npc

2 Likes

You can use Pathfinding for several reasons, not just NPCs or players. Follow the steps here Character Pathfinding | Documentation - Roblox Creator Hub to learn more about pathfinding. You can there skip the steps where it actually moves a character.

2 Likes

So it can even move a part or model for example?

2 Likes

Yes, it even works with parts. However, that’s a bit more complicated from what I have tested in the past. Parts don’t turn automatically like characters of NPCs and players do and when creating waypoints, you also have to make sure to adjust the so-called agent-settings. But I haven’t really worked with it yet, just tried it out and played around with it a bit.

// EDIT: To clarify, parts will also find their way but with turning around I meant their facing. Like if you make a cube go from a to b, it won’t change it’s facing depending on where it goes to, you would need to do that yourself (from what I know).

4 Likes

You can use pathfinding (built into roblox) and use agent parameters to set simple settings for your npc to move (ex: can jump yes or no)

4 Likes

Thank you guys for explaining this really helped, going to test it right now.

2 Likes

Bruh, that’s just my answer copied :skull:

5 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.