Facepunch / sbox-issues

177 stars 12 forks source link

Navmesh.GetAllVerticies and GetAllEdges #5913

Open SwagAccount opened 4 months ago

SwagAccount commented 4 months ago

For?

S&Box

What can't you do?

Get all the edges/verticies of a navmesh.

How would you like it to work?

return a list Vector3 for vertices and a list Line for edges.

What have you tried?

At the moment, for my cover, I am taking a set area and getting a point grid. for each point on the grid I raycast out in a box double the size as the point grid boxes, if it hits something it checks if the point is good cover.

https://github.com/Softsplit/sandbox-classic/blob/Testing/Code/AI/CoverFinder.cs

SwagAccount commented 4 months ago

I like the idea of getting the outer edges of the navmesh, but I can live with just making the List Triangle public in the navmesh script