Procedural graph mover only updates when there are changes to XZ position. However, when a player’s position changes in height, the center point of the Recast graph is not updating. This allows a player to move outside of the graph’s size, only along the Y-axis. I discovered this bug while trying to understand why NPC followers fail to follow the player into canyons.
It is because the graph scan is not performed due to bounds exclusion, even though procedural graph mover is enabled.
Graph Center should be approximately (34, 34, -190), not (34, 65, -190).
Related: ProceduralGraphMover doesn't adjust Bounds Y position
I disagree with “just increase bounds height” because
-
I am using bounds for its intended purpose – to filter out distant paths above and below the player, which is a valid use case. e.g. I don’t want pathing on overhead objects.
-
The height a player may traverse is significant. As they travel, they may be 1024 units below or 1024 units above ground height. With this in mind, why wouldn’t the procedural graph mover snap to the y-axis of the player as they climb and descend mountains?
-
Forcing a larger scan volume than needed seems wasteful to me.
Is my feedback incorrect?
I wouldn’t say it’s correct or incorrect- it’s your feedback after all! All feedback in good faith while at least moderately informed is valid, imo.
But I would say that this situation is pretty easily handled by expanding the bounds. I get the frustration of it being “cleaner” to just follow along the Y axis, but AFAIK it shouldn’t cause performance issues. And one of the reasons for something to be cleaner is to be more performant after all.
I’d recommend looking into TraversalConstraint.filter for this. It’s a very powerful tool. You can use this to check if the path traverses a safe path within a second bounds that follows your player, matching the size of the graph’s bounds.
1 Like
Sounds good. Thank you, tealtxgr**.**