A simple Waypoint script for Unity.
Install
- Download the Unity package from the release section.
- Drag and drop the file into your Asset Folder.
Setup
Tutorial.mp4
- Select the object that should move.
- Drag the script onto the object.
- Create Waypoints (Empty Objects).
- (optional) mark Waypoints to see them better.
- Drag and drop all Waypoints into the Waypoint script. (You have to lock the Inspector)
- Press Play
Options
Loop: Check if the object should move continuous.
Speed: Change the Value to influence the Objects speed.
Rotate to Target: Check if the object should rotate towards the next Waypoint. Warning: Can be a bit buggy on newer Unity versions!
Rotation Speed: Change the Value to change how fast the object should turn.