This is starting to sound like minecraftâs baritone. Itâs almost scary but so exiting to see that we could have realistic npcâs in our games now.
Hell yeah that is very cool feature
Negative costs are valid input values, and itâs ok to use them to annotate special objects, such as power-ups. But since the cost is multiplied by the traversed distance, you might run into a situation where longer paths with negative costs will be preferred over shorter alternatives. So in a practical sense, negative cost values are rewards.
Can we please have an agent parameter that can let us customise the height allowed for the AI to jump? Because in a lot of scenarios the AI cannot jump over a tall wall, despite the AI having high jump power.
This would work great with AI Vehicles!
Thank you, this makes a lot of sense
Unfortunately, based on the following quote from a reply above, it doesnât sound like negative cost values work as described. I would assume, if this is accurate, this is likely either a bug or an oversight due to negative costs being unexpected.
Is it intended that ModifierID and PassThrough values on PathfindingModifiers donât save (they just reset) if I exit the studio?
Yeah. This happened to me. I wanted to create a footpath that my AIs would prefer walk on (rather than the dirt) and then I went to test it, and then nothing happened. And then when I stopped running the game, studio stopped responding.
Thank you, this is a great addition to Pathfinding.
Will you support functionality of Modifiers to work with Models as well? I think itâs impractical and poorly designed if this is to only work with Baseparts because it is tedious and time consuming to add them into every Part instead of a few Models
In general weâd want to have our entire model have a single modifier for all Parts in it if we choose to do so, it would improve UX and QOL.
Oh my! Thatâs a great update, canât wait to test it out right now!
YESS FINALLY AI CAN TRAVEL THROUGH DOORS!
No more getting stuck in rooms!!
Woow, roblox u just made amazing thing, i think is very cool and usefull!
I just loved it!!! Iâm working in a city-style game where NPCs should walk around the city and use crosswalks, Itâs really amazing.
This is also very useful if you are creating buildings in blender. You can block off navmesh errors which are caused by thin walls. Just solved the issue of mobs trying to pathfind through building walls by using kill brick example to block off thin walls and crosswalk exaple to set an easy path in and out of building. I also set pathfinding weights for other materials so mobs prefer to walk on crosswalks.
When I try to recreate the door example, I get a warning saying that the passthrough property isnât supported?
My code:
local pathService = game:GetService("PathfindingService")
local endGoal = workspace.Goal
local doorVolume = workspace.DoorVolume
local modifier = Instance.new("PathfindingModifier")
modifier.ModifierId = "Door"
modifier.Name = "PathfindingModifier"
modifier.Parent = doorVolume
doorVolume.PathfindingModifier.ModifierId = "Door"
doorVolume.PathfindingModifier.PassThrough = true
function createPath(goal)
local canCrossDoor = true
local agentParameters = {
Costs = {
Door = canCrossDoor and 1.0 or math.huge
}
}
local path = pathService:CreatePath(agentParameters)
path:ComputeAsync(script.Parent.HumanoidRootPart.Position, goal.Position)
local waypoints = path:GetWaypoints()
for i, point in pairs(waypoints) do
script.Parent.Humanoid:MoveTo(point.Position)
script.Parent.Humanoid.MoveToFinished:Wait()
end
end
wait(2)
createPath(endGoal)
Very cool feature btw! Glad that roblox is taking steps forward to improve the pathfinding system for us!
EDIT:
Found out it was because I didnât restart studio lol
Can you guys on ROBLOX support your pathfinding system to climb truss parts as well?
it would be nice if NPCs would be able to climb trusses and ladders while pathfinding when it is supported by roblox and not by 3rd party algorithms. It is good for zombie and shooting games.
its probably because you have enabled all beta features. I had the same problem and to fix it i had to turn off all beta features and turn on only the PathfindingModifiers feature.
Anything in the works for adding links between locations, for example if it was set up using 2 attachments/parts with a Cost paramter and a oneway option.
Path:ComputeAsync()
could then return that link as a waypoint which then allows the developer to carry out custom actions, for example Teleport or Climb.
When do you guys plan on releasing this from beta? I couldnât find anything in the thread that lets us approximately know for when we can start implementing and releasing this into our games
You can use any numbers.
Personally, though, I wouldnât use numbers that are too big or less than 1.
Sure. As soon as the bridge becomes walkable (lowered), the Pathfinding Modifier will apply to it.
You are dealing with disconnected parts of navmesh here. Currently, we canât pathfind past the areas of cost math.huge. What I would try is to make gaps under the glowing red things, so that jump links can be generated.
What are the materials that you are using and what costs did you assign to them?