Automatic Traversal Scanning

Hi Aaron,

I made a utility to automatically place NodeLink2s at the junctions between areas created by Recast Graphs and thought I’d share this with you in the hopes that it might inspire you to make something better:

My scanner requires that the user marks two points in the same way that you’d use a NodeLink2 but it also allows you to specify a scan angle, radius and resolution. It finds points between the two areas that are close enough together.

I apply simple rules such as:

  • not too high to mantle or climb upon
  • not too far to jump across
  • not too far to fall down upon without taking damage

It stores pairs of Vector3s and can be made to cross-link to other points within reach to allow for diagonal climbing, and has a bit of functionality to handle corners.

(it’s probably better without crosslinking)

At runtime, it creates NodeLink2s and attaches a custom modifier to the NodeLink2 that informs another custom script to set Mecanim variables to activate the correct climbing/jumping/vaulting animation based on the length and height of the gap. It’s a bit of a Rube Goldberg setup but it’s dynamic and reduces the amount of manual preparation needed in mapmaking.

Maybe a version that scans a box volume similar to the Recast Graph generator that doesn’t require the manual placement of nodes would be useful as well.

  • Mark
1 Like

I did it! I made a thing that simply scans all the graphs, finds edges (it deduces this from triangle nodes that have less than 3 neighbours and then finds the edges based on which ones don’t have connections)

Then it checks each edge against every other edge that is facing in a somewhat opposite direction to see if there are points along the edges within jumping distance (and applies a few capsulecast checks to ensure an unobstructed path).