Adventure Creator  1.79.1
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2022
AC.NavigationEngine_meshCollider Class Reference
Inheritance diagram for AC.NavigationEngine_meshCollider:
AC.NavigationEngine

Classes

class  NavMeshData
 

Public Member Functions

override void OnReset (NavigationMesh navMesh)
 Called when the scene begins or is reset. More...
 
override void TurnOn (NavigationMesh navMesh)
 Enables the NavMesh so that it can be used in pathfinding. More...
 
override Vector3[] GetPointsArray (Vector3 originPos, Vector3 targetPos, AC.Char _char=null)
 Calculates a path between two points. More...
 
override void ResetHoles (NavigationMesh navMesh)
 
override string GetPrefabName ()
 Gets the name of a "helper" prefab to list in the Scene Manager. More...
 
override Vector3 GetPointNear (Vector3 point, float minDistance, float maxDistance)
 Finds a random position surrounding a given point on a NavMesh. More...
 
override void SceneSettingsGUI ()
 
- Public Member Functions inherited from AC.NavigationEngine
Vector3[] GetPointsArray (Vector3 startPosition, Vector3[] targetPositions, AC.Char _char=null)
 Calculates a path between multiple points. More...
 
virtual NavigationMesh NavigationMeshGUI (NavigationMesh _target)
 
virtual void DrawGizmos (GameObject navMeshOb)
 Draws gizmos in the Scene/Game window. More...
 

Protected Member Functions

bool IsVertexImperfect (Vector3 vertex, Vector3[] blackList)
 
float GetPathLength (List< Vector3 > _pointsList, Vector3 candidatePoint, Vector3 endPos)
 
bool IsLineClear (Vector3 startPos, Vector3 endPos, bool ignoreOthers)
 
Vector3 GetLineBreak (Vector3 startPos, Vector3 endPos)
 
Vector3[] CreateVertexArray (Vector3 targetPos)
 
List< Vector3 > FindComplexPath (Vector3 originPos, Vector3 targetPos, bool ignoreOthers)
 
Vector3 GetNearestToMesh (Vector3 point)
 

Protected Attributes

bool pathFailed = false
 
- Protected Attributes inherited from AC.NavigationEngine
Vector2[] vertexData
 

Properties

override bool RequiresNavMeshGameObject [get]
 
- Properties inherited from AC.NavigationEngine
virtual bool RequiresNavMeshGameObject [get]
 

Additional Inherited Members

- Public Attributes inherited from AC.NavigationEngine
bool is2D = false
 

Member Function Documentation

◆ GetPointNear()

override Vector3 AC.NavigationEngine_meshCollider.GetPointNear ( Vector3  point,
float  minDistance,
float  maxDistance 
)
virtual

Finds a random position surrounding a given point on a NavMesh.

Parameters
pointThe given point on the NavMesh
minDistanceThe minimum distance between the given point and the random point
maxDistanceThe maximum distance between the given point and the random point
Returns
A random position surrounding the given point. If a suitable point is not found, the original point will be returned.

Reimplemented from AC.NavigationEngine.

◆ GetPointsArray()

override Vector3 [] AC.NavigationEngine_meshCollider.GetPointsArray ( Vector3  startPosition,
Vector3  targetPosition,
AC.Char  _char = null 
)
virtual

Calculates a path between two points.

Parameters
startPositionThe start position
targetPositionThe intended end position
_charThe character (see Char) who this path is for (only used in PolygonCollider pathfinding)
Returns
The path to take, as an array of Vector3s.

Reimplemented from AC.NavigationEngine.

◆ GetPrefabName()

override string AC.NavigationEngine_meshCollider.GetPrefabName ( )
virtual

Gets the name of a "helper" prefab to list in the Scene Manager.

Returns
The name of the prefab to list in SceneManager. The prefab must be placed in the Assets/AdventureCreator/Prefabs/Navigation folder. If nothing is returned, no prefab will be listed.

Reimplemented from AC.NavigationEngine.

◆ OnReset()

override void AC.NavigationEngine_meshCollider.OnReset ( NavigationMesh  navMesh)
virtual

Called when the scene begins or is reset.

Parameters
navMeshThe NavigationMesh that is active in the scene.

Reimplemented from AC.NavigationEngine.

◆ ResetHoles()

override void AC.NavigationEngine_meshCollider.ResetHoles ( NavigationMesh  navMesh)
virtual

Integrates all PolygonCollider2D objects in the polygonColliderHoles List into the base PolygonCollider2D shape. This is called automatically by AddHole() and RemoveHole() once the List has been amended

Reimplemented from AC.NavigationEngine.

◆ SceneSettingsGUI()

override void AC.NavigationEngine_meshCollider.SceneSettingsGUI ( )
virtual

Provides a space for any custom Editor GUI code that should be displayed in SceneManager.

Reimplemented from AC.NavigationEngine.

◆ TurnOn()

override void AC.NavigationEngine_meshCollider.TurnOn ( NavigationMesh  navMesh)
virtual

Enables the NavMesh so that it can be used in pathfinding.

Parameters
navMeshObThe NavigationMesh gameobject to enable

Reimplemented from AC.NavigationEngine.