Saving and loading position of an object on a waypoint



  • I have an object that traverses the waypoints, what variables should I save and load to resume the position of the object on the path?



  • It depends on where your object is, and where you want to start it from:

    • Starting from a waypoint
      The current waypoint index is saved as "currentPoint" variable on the movement script. If you would like to set this as the starting waypoint later on, assign this number to the "startPoint" variable. Alternatively you could also call the GoToWaypoint method at any time.

    For a full list of public variables and methods please have a look at our scripting reference.
    https://www.rebound-games.com/docs/sws/splineMove.html

    • Resuming in between waypoints
      Access the current path progress on the tween directly, via tween.fullPosition (on the splineMove script) and assign this time value later on, to place the object at the same spot.

    For more details on DOTween tween variables and methods please have a look at its documentation.
    http://dotween.demigiant.com/documentation.php#gettingData


Log in to reply