Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void MoveAnim()
- {
- float waitedTime = 0;
- // if it is not in the destination, keep moving
- while (this.transform.position != _destination.transform.position)
- {
- waitedTime += Time.deltaTime;
- transform.position = Vector3.MoveTowards(transform.position, _destination.transform.position, speed);
- }
- currentPos = _destination;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement