Class RichFunnel Extends RichPathPart

Public

Public Methods

BuildFunnelCorridor (nodes, start, end)

Build a funnel corridor from a node list slice.

Public
ClampToNavmesh (position)

Clamps the position to the navmesh and repairs the path if the agent has moved slightly outside it.

Public
FindWalls (wallBuffer, range)

Fill wallBuffer with all navmesh wall segments close to the current position.

Public
Initialize (path, graph)

Works like a constructor, but can be used even for pooled objects.

Public
OnEnterPool ()
Public
RichFunnel ()
Public
Update (position, buffer, numCorners, lastCorner, requiresRepath)

Find the next points to move towards and clamp the position to the navmesh.

Public

Public Variables

CurrentNode
Public
DistanceToEndOfPath

Approximate distance (as the crow flies) to the endpoint of this path part.

Public
exactEnd
Public
exactStart
Public
funnelSimplification

Post process the funnel corridor or not.

Public

Private/Protected Members

CheckForDestroyedNodes ()

True if any node in the path is destroyed.

Private
checkForDestroyedNodesCounter
Private
ClampToNavmeshInternal (position)

Searches for the node the agent is inside.

Private
currentNode
Private
currentPosition
Private
FindNextCorners (origin, startIndex, funnelPath, numCorners, lastCorner)
Private
FindWalls (nodeIndex, wallBuffer, position, range)
Private
graph
Private
left
Private Readonly
navmeshClampDict

Cached object to avoid unnecessary allocations.

navmeshClampList

Cached object to avoid unnecessary allocations.

navmeshClampQueue

Cached object to avoid unnecessary allocations.

nodes
Private
path
Private
right
Private Readonly
SimplifyPath (graph, nodes, start, end, result, startPoint, endPoint)

Simplifies a funnel path using linecasting.

Private
triBuffer
Private
UpdateFunnelCorridor (splitIndex, prefix)

Split funnel at node index splitIndex and throw the nodes up to that point away and replace with prefix.

Private