Place1.rbxl (63.2 KB)
I think the correct is the left half to move left and the right half to move right. like this image
I think the correct is the left half to move left and the right half to move right. like this image
(Nevermind, see next post)
Iām having a problem with the new algorithm where it pathfinds directly through 2 walls.
Without the new enabled it works completely fine:
But then with the new enabled, look what happens:
Iām not too sure why this happens. Hereās the navigation mesh (while not in test mode):
Hereās a chopped of version of my pathfinding code:
...
local RobloxPath = RobloxPathfindingService:CreatePath({
AgentRadius = Settings.NPCRadius,
AgentHeight = Settings.NPCHeight,
WaypointSpacing = math.huge,
AgentCanJump = false,
Costs = {
Snow = math.huge,
Metal = math.huge,
},
})
...
local Success, _ = pcall(function()
RobloxPath:ComputeAsync(FromPosition, ToPosition)
end)
Wow nevermind, I forgot I had a cap for the amount of waypointsā¦ oops.
After adjusting this things are working completely fine, but Itās a bit concerning how many more waypoints are generated with the new algorithm. This is a bit specific for my scenario, but the waypoint positions are serialized and replicated, so Iād prefer the least amount of waypoints possible (I already have WaypointSpacing set to math.huge)
Hereās before:
With the new algorithm:
There are a lot of unnecessary extra waypoints around turns. Is this intended? Are there any plans to reduce this?
Thatās a keen insight. Youāre right, the new algorithm dynamically generates two or three waypoints based on the sharpness of the turn. This refined approach ensures smoother NPC navigation, especially around bends. The previous production algorithm, which simply offset by the agent width, often resulted in NPCs getting stuck in tight spaces.
This improvement focuses on having the NPCs intelligently follow the approach direction and adapt to the shape and curvature of obstacles.
If you notice any performance impact from this, please let us know. We plan to optimize it further down the line.
The smoothened turns compared to the old algorithm does seem like itād be very helpful in most uses but is actually not what Iām looking since in my case the āqualityā of the path is not worth the extra waypoints. This is because Iām using the waypoints to construct a custom path which is then serialized into a string and replicated. Having just a couple more waypoints means a larger string to replicate and therefore isnt favorable (Iām looking for performance over quality).
Itād be nice to have an option to disable the agent adapting to turns, maybe a new option like this:
Maybe im doing something wrong, but the new pathfinding doesnt seem to work in studio, even though i have turned the setting on.
Iām not sure if youāre taking feature requests from here butā¦
Could there possibly be an agent parameter that determines how far of drops they can take? It would help a lot in cases where we want NPCs to avoid taking fall damage, the NPCs in most games Iāve worked on currently just have a bad habit of just jumping off cliffs instead of walking the way down because itās directly a shorter path to the end goal. (THEYāRE MANIACS!!)
The reason Iām asking this is because these drop points seem like it could easily support such a feature as seen here.
A lot a people before me have already asked for this as well but possibly we could introduce parameters for how high an agent can jump; Iām bringing this up now because I want to have the NPCs in my game be able to drop down from safe distances, but I also donāt want them to be able to jump. Falling down being separate from āAgentCanJumpā would be very much appreciated!
I look forward to seeing how the current pathfinding features can be improved and expanded upon.
Please @watIsInTheName There is a critical bug that causes the new pathfinding to stutter left and right on a moving target!
Please check the Rep:
PathfindingTest.rbxl (80.8 KB)
Also Like @HuntDownTheXboxMan said if the pathfinding could add AgentJumpHeight : float
in favor of the current AgentCanJump : boolean
and, AgentFallHeight : float
as a feature suggestion, since i cant post on feature suggestions. A lot of poeple will find it very usefull
Thank you for reporting this issue. Weāre investigating it we will come back with a response.
I think Iāve found a bug.
0:00 to 0:22 is what it should do (the old Pathfinding).
0:22 is the bug (the new one).
Hi Creators,
PathfindingUseImprovedSearch is now restored. If you have already opted in to PathfindingUseImprovedSearch, please opt out now to avoid any unexpected production changes.
Tomorrow, on March 11, we will officially re-enable the production opt-in. We will update this post once re-enabled, and you can opt in again to take advantage of these improvements.
For more information, read here.
Thank you for reporting this issue. Would you mind sent me a repo?