I've been left in the lerp!

I’ll post my code below, please explain how you fixed it :slight_smile:

I’ve got a sprite and I’m getting it’s local scale of whatever it’s set to and then over time scaling it down with lerp to a new vector 3 zero and it’s working, but here it just happens the once or my timing if off and I can’t see it, can you help? cheers

see next post

Got it, I was trying to take too many short-cuts perhaps… anyway

		public IEnumerator SpriteScaleOut ()
		{
				_interpolator = 0.0f;
				while (_interpolator < 2.0f) {
						_interpolator += Time.deltaTime * 0.02f;
						transform.localScale = Vector3.Lerp (transform.localScale, _current, _interpolator);
						yield return null;
				}
				
		}
private Vector3 _current = Vector3.zero;
		private float _interpolator = 0.0f;

Does the trick for me…