Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- IEnumerator Move(GameObject objectToMove, Vector3 pos1, Vector3 pos2, AnimationCurve ac, float time) {
- float timer = 0.0f;
- while (timer <= time) {
- objectToMove.transform.position = Vector3.Lerp (pos1, pos2, ac.Evaluate(timer/time));
- timer += Time.deltaTime;
- yield return null;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement