c47edit icon indicating copy to clipboard operation
c47edit copied to clipboard

Pathfinding for Rooftops

Open ArchDome opened this issue 1 year ago • 1 comments

I'm trying to make a map that will have NPCs move around on rooftops, but I'm running into some issues. In this example, I placed a pedestrian pathpoint to start on the roof and then another point at the same height on the other end of the roof. However he'll appear for a moment and then teleport down to a Y value that's the same as the ground and continue moving, passing through walls and standing on ground that isn't there.

Pathfinding issues (3)

For C1_1.zip Inside ZRoot -> ZGROUP::PathFinder ->ZPathFinder2 I can find some references to Pathinfo data and some additional settings. Maybe the solution to this problem is somewhere here. Is it possible to regenerate the Global Path data to include rooftops as playable spaces?

I've also noticed some interesting NPC behavior when there's a drop in the Y-axis. For instance, I removed the NoWalk geometry around the elevated platform. I wanted to make it so that when the guards got shot they would fall off the platform. However, with NoWalk removed, the guards can just walk straight off, without even having some sort of falling animation.

Pathfinding Large Y Drop (1)

I found a workaround where I can position the NoWalk walls just high enough so the NPCs can't step over, but still low enough for their ragdolls to fall off. It's not the best solution because 47 can't drag the body off the ledge. image

ArchDome avatar Nov 11 '24 20:11 ArchDome

Pathfinding support is something that I've started to work on very recently and is still incomplete. It is possible to view them, but there is no way to generate the pathfinding from the level model right now as it looks complex to implement.

However, since you tried C1_1 there is actually one building that has pathfinding nodes (the colored boxes) on the top, you may try putting NPCs and see if it works there: image

AdrienTD avatar Nov 14 '24 19:11 AdrienTD