Getting Started
The concept in Simple Waypoint System is based on paths and movement scripts. For a movement script to move on waypoints, you will first have to create a path. A path can be created in 2D or 3D space.
If the 2D button in your editor scene view is enabled, waypoints will automatically placed with a Z position of 0.
Start by creating a new path in 3D space. When placing waypoints in 3D, you will need to have colliders or some kind of ground in the scene, so that the internal raycast knows how far away it should place the waypoints.
- Open a new scene and create a plane. This plane will act as a ground for placing waypoints.
- Add the
WaypointManager
to your scene via the editor menuWindow > Simple Waypoint System > Waypoint Manager
.
- Select the
WaypointManager
and enter a name for your path. Click on Start Path. The button turns yellow and indicates that the placement mode is active.
You can customize the Placement Key
used for placing waypoints in the scene, but also the View Placement Key
for placing waypoints at your current scene view camera position.
- Place waypoints onto the plane at your mouse position by pressing P (default) on your keyboard. After placing some waypoints, press Finish Editing to exit placement mode.
- Now you would want to let an object move on that path.
- Create a cube and attach the movement script
splineMove
to it - Assign the newly created path to its
Path Container
slot - Enable
On Start
Press Play to see the object move on the path!