G General

Navpoint Movement

Navpoint Movement
Details
Features
Contents
Reviews

This script allows you to quickly make an object follow navpoints. You don't need to know any scripting for this, just to put some objects along the path and name them 'Nav0', 'Nav1', 'Nav2' and so on.

We shall call the moving object 'vehicle' from now on, although it can be something different. The object used as navoint we shall call 'navpoint' fronmnow on.

PACKAGE CONTENTS:
Navpoint Dictator - brain script
Navpoint Executor Move - movement engine
Navpoint Rota 1 - rotation (look at target)
Navpoint Rota 2 - rotation (point at target)
Navpoint Chair - a sample object to use as a vehicle.

SETTING THE OBJECT
1. Make sure that at zero rotation (zero degrees in any direction) vehicle is pointing EAST. Otherwise, you will have to rotate the root prim or link another prim as root.
2. Put the scripts inside vehicle:
- Navpoint Dictator (the brain script)
- Navpoint Executor Move (the engine)
- Navpoint Executor Rota (commands rotation, two versions):
-- Navpoint Rota 1 makes the object point stand vertical while looking at the target.
-- Navpoint Rota 2 makes the object look at the target, bending towards it.

SETTING THE PATH
1. Build the path.
- Put navpoints along the way and name them in order. Navpoints can be any object that is not scripted (it has no script inside).
Name your navpoints in order: Nav0, Nav1, Nav2, Nav3, Nav4 and so on. You can get as many as you want.
- Make sure navpoints are not further than 27 m apart.
2. Set return point.
- If the last navpoint is close to the first one, edit it and on its description write 'B'.
- If nothing is written in the last navpoint, vehicle will die at 10 seconds after arriving at last navpoint.
3. Crossing sim borders (optional).
- Put a navpoint very close to the sim border (3 m should be optimal). On its description write 'A'.
- Vehicle will go to that navpoint. From there, it will go on a straight line from sim center towards the end.
- Put another navpoint just beyond the sim border (3 m should be ideal).
- Angles will be affected during this time, vehicle will not point at a navpoint until sim crossing was successful.
4. Setting speed (optional).
- By default, the speed is set to 20.
- If you want to change speed, edit a navpoint and write the speed you want (from 1 to 100). If you want a speed of 35, just write '35'.
- You can change speed at any navpoint except return and sim cross navpoints.
- Do not set speed above 100 or below 1.
- High lag might cause the script to crash at high speeds.

POSSIBLE PROBLEMS
1. Script crash.
- Don't set speed higher than 100 or lower than 1.
- If you are in a high lag area, keep speed below 50.
2. Vehicle vanishing.
- Make sure navpoints are in order (e.g. Nav0, Nav1, Nav2, Nav3 and so on) and their name is written properly.
- Make sure navpoints are not too far one from another.
3. Vehicle not starting or got stuck.
- Check if land allows scripts to work.
- Check if land allows objects entry.
4. Neighbors got angry cause your vehicles keep entering their land.
- During sim restart processes, it might happen. There is nothing you can do about it.
- Be careful and check the route, make sure that is not the cause.

LICENSE CONDITIONS:

- You have full license to sell your objects containing the scripts.
- You have full license to build better scripts starting from these ones and sell them.
- You can give the scripts to your friends for free.

LICENSE EXCLUSIONS:

- Please, do not offer these scripts as freebies.
- Do not resell the scripts as they are.
- You can use the scripts to make demos for free.

Money keeps merchants active on SL, stimulates creativity and development. By offering things for free you cause more harm than helping other people.

EXTRA NOTES:
I made this script after someone asked me to script a raft running along a waterfall, where navpoints are stones in the water.

Have fun!

  • Object automated movement
  • Easy to set
  • Navigate from one point to another
  • One-way or loop
  • Full documentation
Average rating: full star full star full star full star full star
  • 5 star:
  • 4 star:
  • 3 star:
  • 2 star:
  • 1 star:
perfect
full star full star full star full star full star Posted July 03, 2025 by Claudie Aeon

Work well. Thanks

Was this review helpful?