SebastianLawe

Untitled

Apr 15th, 2015
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.36 KB | None | 0 0
  1.         transform.position = Vector3.Lerp(transform.position, waypoints[currentWaypoint].position, damping);
  2.         if (transform.position == waypoints[currentWaypoint].position) {
  3.             if ((currentWaypoint < waypoints.Length && direction) || (currentWaypoint > 0 && !direction)) {
  4.                 currentWaypoint += direction ? 1 : -1;
  5.             } else {
  6.                 direction = !direction;
  7.             }
  8.         }
Advertisement
Add Comment
Please, Sign In to add comment