Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // state of pressing right
- if (moveDirection.x > 0)
- {
- if (percReset == 0)
- {
- perc = 0;
- percReset++;
- }
- if (percReset >= 1)
- {
- startPos = 0;
- endPos = moveDirection.x;
- moveDirection.x = Mathf.Lerp(startPos, endPos, perc);
- currLerpTime += Time.deltaTime;
- }
- if (perc == 1)
- {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement