duck

duck

Nov 11th, 2010
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.20 KB | None | 0 0
  1. float zStart = -15;
  2. float zEnd = -2;
  3.  
  4. float xStart = 0;
  5. float xEnd = -4;
  6.  
  7. void Update() {
  8.     float zi = Mathf.InverseLerp(zStart, zEnd, currentZ);
  9.     float currentX = Mathf.Lerp(xStart, xEnd, zi);
  10. }
Advertisement
Add Comment
Please, Sign In to add comment