Would this in the future support models?
Doesn’t seem to work out for me:
Only bounds to BaseParts (for now, hopefully):
Would this in the future support models?
Doesn’t seem to work out for me:
Only bounds to BaseParts (for now, hopefully):
Yes, I needed this so much, I was almost going to do this in a very hacky way.
I can now finally make NPCs walk through doors, I needed this for so long.
Now we can finally make NPCs that walk on sidewalks of streets, go through doors, walk over bridges instead of attempting to swim and all that cool stuff.
I think this feature has been requested for years and it’s finally here, my day has been made. Today feels epic.
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.