NavGrid Move
Moves a GameObject cell-to-cell on a NavGrid using 4-way or 8-way snapped input.
Movement is smooth and lands exactly on cell centers.
| Parameter | Description |
|---|---|
| GameObject | Object to move. |
| NavGrid | Grid defining origin and cell size. |
| Input Direction | Input vector to snap into movement directions. |
| Keep Moving | If true, keeps last direction when input becomes zero. |
| Allowed Directions | FourWay or EightWay movement. |
| Speed | Movement speed in world units per second. |
| Turn Window | Distance from center where turn input is accepted. |
| Normalize Diagonal | Normalizes diagonal speed in eight-way mode. |
| Arrived Event | Sent each time a new cell center is reached. |
| Is Moving | Optional output flag while moving. |
| Movement | Optional output current movement vector. |
| Direction | Optional output snapped grid direction. |
Example
- Provide joystick or axis vector to Input Direction.
- Set Allowed Directions to match your game style.
- Use Arrived Event for step-based triggers.