Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float zStart = -15;
- float zEnd = -2;
- float xStart = 0;
- float xEnd = -4;
- void Update() {
- float zi = Mathf.InverseLerp(zStart, zEnd, currentZ);
- float currentX = Mathf.Lerp(xStart, xEnd, zi);
- }
Advertisement
Add Comment
Please, Sign In to add comment