i will definitely use this on a future game of mine, thanks for releasing this ^^
sounds very useful and promising
is something like pathfinding for agents that can fly planned in the future?
Unfortunately it looks like the update has critically changed the behavior of PathWaypoint.new()
A heads up wouldâve been nice
Sorry about that. We have reverted the flag and it should behave as expected. PathfindingModifiers should continue working as expected as well. If you could share the use case of why you create new Pathwaypoints in your game would be highly appreciated. This would help us understand the needs better.
Not the original commenter, but I create PathWaypoints by hand to fix some waypoints. For example, I have an issue where the jump action is used unnecessarily, so I manually override some waypoints. Usually, for me, itâs just for manual path creation/fixing the existing path calculation.
Thanks for sharing. Appreciate it.
In my use case, I manually create waypoints when the NPC spots a player. If no players have been spotted, they go from A to B normally, the second a player is in view I add new waypoints to their path table to force them in the direction of that player.
Awesome to see this come out! I have been waiting for this to come out for months now fully as there are many things that I want to try out with it! Itâll be nice to see what others make out of it too.
This is one of my favorite updates as I am a huge fan of making AIs and this opens up the opportunity to do some really creative improvements to NPCs! Good job.
This is one of my favorite things as Iâm constantly working on games that uses NPCâs and it can also developers a lot, Nice job guys
I cannot wait to use this in my game! The opportunities pathfinding modifiers have on AI and pathfinding is infinite! This is probably my favorite update to studio to far! Thank you!
Extremely excited about this change! Creating Smart AI has gotten so much easier over the years thanks to a handful of updates like this one. Thanks
I know, I know, HUGE bump, but I canât make a feature request so any minimods will have to deal with me bumping the most relevant thread ÂŻ\_(ă)_/ÂŻ
Anyway, I feel like PathfindingModifiers are a PERFECT candidate for a way to have custom waypoint actions, there could be a new boolean property (it could be called
IsCustomActionRequired
) and a new method for PathWaypoint to get the Label
property of that modifier, so I could have a volume in a vent shaft and have a PathfindingModifierâs Label
property set to âCrouchâ.
Like this:
local PathfindingService = game:GetService("PathfindingService")
local Path = PathfindingService:CreatePath()
local Waypoints = Path:GetWaypoints()
for _, Waypoint in pairs(Waypoints) do
--I mean, there's even an enum for this...
if Waypoint.Action == Enum.PathWaypointAction.Custom then
local Action = Waypoint:GetModifierAction()
if Action == "Crouch" then
--Make AI crouch before going to waypoint
end
end
end
Maybe even like⌠just allow us to get the Label of the pathfinding modifier the waypoint is inside of? Thatâs probably the easiest way to do this.
PathWaypoint.Label
was enabled last week.
It is not reflected in the reference docs yet, but itâs safe to use just as you described.
Iâm sure not, but I think this change might have introduced some instability with navmesh regeneration when ungrouping a ton of models. I ungrouped a giant (in terms of number of parts) playground model with many nested models, and now the navmesh seems to have given up with my shenanigans and just wonât generate, making ComputeAsync always fail and give a status of NoPath, even if I run the game, even if I restart Studio, the file just seems to be completely broken. Maybe some new optimization with models is the reason to blame?
(âShow Navigation Meshâ is very clearly turned on, but thereâs no navigation mesh in sight)
The dummy rig attempts to pathfind to the block right in front of them with the following code:
local PathfindingService = game:GetService("PathfindingService")
local NPC = script.Parent
local Humanoid = NPC.Humanoid
local HumanoidRootPart = NPC.HumanoidRootPart
HumanoidRootPart:SetNetworkOwner(nil)
print("make path")
local Path:Path = PathfindingService:CreatePath()
Path:ComputeAsync(HumanoidRootPart.Position, workspace.SlideStart.Position)
print(Path.Status.Name)
for _, Waypoint:PathWaypoint in pairs(Path:GetWaypoints()) do
print(Waypoint.Label)
if Waypoint.Label ~= "Slide" then
Humanoid:MoveTo(Waypoint.Position)
Humanoid.MoveToFinished:Wait()
else
Humanoid:MoveTo(HumanoidRootPart.Position)
Humanoid.Sit = true
end
end
But Path.Status is always NoPath, and no waypoints are generated!
But anyway, thanks for pointing this new property out!
Could you create a separate bug report for this and @ me, or send me the repro place in a private message?
Thanks!
Sure thing! Iâve just sent a DM.
Navigation meshes have been unreliable since about July of 2021. They worked perfectly for my game until some July, 2021 updates required me to create a backup system using A* path finding. Now if my game is unable to compute a path, I have A* as a backup path finding service for my NPCs.
Well, uh, by the looks of it this specific issue was caused by a humanoid being directly under workspace, the reason the navigation mesh isnât generating is specifically because pathfinding is meant to ignore humanoids because of how they are almost always non-collidable. Other than, no clue what youâre talking about. Theyâve always been reliable for me.
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.