Skip to content

NavGrid Follow Path

Moves a GameObject along a NavGrid path.

Supports two modes:

  • Smooth: velocity-based steering with acceleration/deceleration.
  • Exact: segment walking without overshoot.
Parameter Description
GameObject Object to move.
NavGrid Grid used to convert path cells to world positions.
Path Cells Input path as grid cells.
Path Mode Smooth or Exact.
Speed Top speed in world units per second.
Acceleration Mode Instant or Smooth speed changes.
Acceleration Acceleration rate (smooth mode).
Deceleration Deceleration rate (smooth mode).
Stopping Distance Arrival threshold and waypoint advance distance.
Preserve Speed On Repath Keeps current speed when path changes.
Normalize Diagonal Smooth-mode diagonal normalization.
Arrived Event Sent when final waypoint is reached.
Is Moving Optional output flag while moving.
Direction Optional output movement direction.
Segment Index Optional output current segment index.

Example

  1. Generate Path Cells with NavGrid Find Path.
  2. Set Path Mode to Exact for strict no-overshoot movement.
  3. Use Arrived Event to trigger next behavior.

See also