Simple Waypoint System  5.4
Public Types | Public Member Functions | Public Attributes | List of all members
navMove

Movement script: pathfinding using Unity NavMesh agents. More...

Inheritance diagram for navMove:

Public Types

enum  LoopType { none, loop, pingPong, random }
 Supported movement looptypes when moving on the path. More...
 

Public Member Functions

void StartMove ()
 Starts movement. Can be called from other scripts to allow start delay. More...
 
void GoToWaypoint (int index)
 Teleports to the defined waypoint index on the path. More...
 
void Pause (float seconds=0f)
 Pauses the current movement routine for a defined amount of time. More...
 
void Resume ()
 Resumes the current movement routine. More...
 
void Reverse ()
 Reverses movement at any time. More...
 
void SetPath (PathManager newPath)
 Changes the current path of this walker object and starts movement. More...
 
void Stop ()
 Disables any running movement routines. More...
 
void ResetToStart ()
 Stops movement and resets to the first waypoint. More...
 
void ChangeSpeed (float value)
 Wrapper to change agent speed. More...
 

Public Attributes

PathManager pathContainer
 Path component to use for movement. More...
 
bool onStart = false
 Whether this object should start its movement at game launch. More...
 
bool moveToPath = false
 Whether this object should walk to the first waypoint or spawn there. More...
 
bool reverse = false
 reverse the movement direction on the path, typically used for "pingPong" behavior. More...
 
int startPoint = 0
 Waypoint index where this object should start its path. More...
 
int currentPoint = 0
 Current waypoint indicator on the path. More...
 
bool closeLoop = false
 Option for closing the path on the "loop" looptype. More...
 
bool updateRotation = true
 Whether rotation should be overridden by the NavMesh agent. More...
 
List< UnityEvent > events = new List<UnityEvent>()
 List of Unity Events invoked when reaching waypoints. More...
 
LoopType loopType = LoopType.none
 
Transform[] waypoints
 Waypoint array references of the requested path. More...
 

Detailed Description

Movement script: pathfinding using Unity NavMesh agents.

Member Enumeration Documentation

enum LoopType
strong

Supported movement looptypes when moving on the path.

Enumerator
none 
loop 
pingPong 
random 

Member Function Documentation

void ChangeSpeed ( float  value)

Wrapper to change agent speed.

void GoToWaypoint ( int  index)

Teleports to the defined waypoint index on the path.

void Pause ( float  seconds = 0f)

Pauses the current movement routine for a defined amount of time.

void ResetToStart ( )

Stops movement and resets to the first waypoint.

void Resume ( )

Resumes the current movement routine.

void Reverse ( )

Reverses movement at any time.

void SetPath ( PathManager  newPath)

Changes the current path of this walker object and starts movement.

void StartMove ( )

Starts movement. Can be called from other scripts to allow start delay.

void Stop ( )

Disables any running movement routines.

Member Data Documentation

bool closeLoop = false

Option for closing the path on the "loop" looptype.

int currentPoint = 0

Current waypoint indicator on the path.

List<UnityEvent> events = new List<UnityEvent>()

List of Unity Events invoked when reaching waypoints.

LoopType loopType = LoopType.none
bool moveToPath = false

Whether this object should walk to the first waypoint or spawn there.

bool onStart = false

Whether this object should start its movement at game launch.

PathManager pathContainer

Path component to use for movement.

bool reverse = false

reverse the movement direction on the path, typically used for "pingPong" behavior.

int startPoint = 0

Waypoint index where this object should start its path.

bool updateRotation = true

Whether rotation should be overridden by the NavMesh agent.

Transform [] waypoints

Waypoint array references of the requested path.


The documentation for this class was generated from the following file: