New Pathfinding Modifiers - Studio Beta

Wow, nice feature @Cinderstock ! But can I add this into my games? Is this works at games right now, if I enable this? Or is it just works in studio for now Edit: Okay i tested it works, another question when will it release to public?

1 Like

Hey folks, it’s hard to say. Just stay tuned.

3 Likes

I was thinking having API like:

local modifier = Instance.new("PathfindingModifier")
modifier.ModifierId = "DeathBrick"
modifier.Adornee = deathBrickPart
modifier.Parent = PathfindingService

or something similar.

2 Likes

Oh, this looks very interesting. I’ve been working on sprucing up an old build-to-survive-ish game from 2015, that uses a lot of pathfinding enemies, and this is the exact kind of thing that would be very helpful. Often some of the smallest enemies get stuck in water or something and slow down the game, hopefully this can help fix it.

1 Like

This is so much better especially with a game I’m working on which has lots of npcs!

1 Like

For Future Development: can you make a pathfinding function for vehicles? They have some features which differ a lot from what we see for humans or NPCs

Sure, go ahead and try that, but instead of

modifier.Adornee = deathBrickPart
modifier.Parent = PathfindingService

use this:

modifier.Parent = deathBrickPart


The pathfinding modifiers seem a little inconsistent. I tried setting the terrain I’d prefer they use to a very low cost, e.g. 0.01, and I figured that may be the issue since I saw in this thread a mention of using only numbers 1 and greater, so I simply set it to 1 and set the cost of grass to 50, but in both cases occasionally the NPC would simply stop for a moment, or much more commonly they would stutter at each waypoint, freezing up before moving again, moving much more slowly as they tried to figure out where to go next on the preferred terrain. Putting a brick that covers the whole path sideways across it was a nightmare for the NPC to figure out. The pathfinding script itself is very basic since I was just testing this feature and nothing else, and with no costs defined it works just fine. Is this stuttering and wandering around in suboptimal paths I’m getting a common issue?

1 Like

Are you using Humanoid.MoveToFinished:Wait() or perhaps listening on that signal? If so when you saw the stuttering were you doing a play-test where your character was near the NPC? If so I’m willing to bet that the stuttering you’re seeing is the physics ownership of the NPC changing between the server and you and vice-versa. If you explicitly set the NPC’s root part’s physics ownership via RootPart:SetNetworkOwner(nil) it will force the physics owner to the server.

1 Like

That solved the stutter yeah (thanks for that <3), still getting pathfinding issues when weighing different terrains with different values though. My temporary solution is just to have paths be very narrow, they still bounce between the sides of it but with there being so little width the player won’t notice the rare times they just turn 90 degrees or walk completely off from the direction they need to for a moment.

1 Like

Hey, Pathfinding Modifiers are about pathfinding, not path-following, so the issue must be elsewhere. I would use the player avatar and send it with a right-click - to see if there is any difference with your situation.

By the way, you can now use positive values even less than 1. You can even use 0, but then we can’t guarantee optimality, since there can always be some teleport behind you almost the same distance to goal, and we would have to search very slowly to detect it.

Hi I have a confusion, does the pathfinding modifier cannot be published live? Since I notice when testing the path modifier instance when I set the modifier id manually and save the place and close RS then open again and try to go back to the modifier, The modifier ID is blank.

I’m confused, do I have to set it on script only?

It’s a studio beta, so you can only use it in studio.

2 Likes

Hows the progress? It’s been a while since new pathfinding modifier studio-only beta came out, it was fun using modifier, where AI was marching and was avoiding few danger zones, + AI vehicle was perfect as it drifted and not being reckless, but theres bit of issue.

Some pathfinding issue

  • Pathfinds the zone where the cost is infinite
    It should return pathfinding failed status, so I wouldnt have to check each of the waypoints if it’s zone cost is infinite, it hurts the performance.

How long is it gonna take, I’m quite sure that basic checks / priority can be set?

1 Like

When will it fully release? I want to use this in my games. I’ve been waiting for 3 months now

3 Likes

MoveToFinished:Wait() has a delay of around 0.1 seconds

Back from the holidays, working on it. :slight_smile:

5 Likes

Thank you dude. I lvoe you.so much

1 Like

Hey Developers, as we get closer to releasing this feature, we have made a major change to the API, along with a number of bug fixes. One of these changes will result in some errors and will need to be updated.

The PathfindingModifier.ModifierId property has been renamed PathfindingModifier.Label.
This is to ensure smooth integration with upcoming pathfinding features.

Unfortunately, since this feature is still in Beta, any values set in PathfindingModifier.ModifierId will be lost and you will have to reset them.

Please let us know if you have any questions.

6 Likes

Out of curiosity, can’t you create a ModifierID property and mark it deprecated, along with having the code for the property just mirror its value to Label?

Also, what will happen to developers who use instance tagging with a Label script property? I’d prefer it be called something unique, like Identity,Ident for short, or PathType.

1 Like