Skip to content

Commit

Permalink
Merge pull request #77 from charlesgriffiths/patch-1
Browse files Browse the repository at this point in the history
easing uses start/diff, lerp uses start/end
  • Loading branch information
prime31 committed Jul 12, 2016
2 parents c5ab4b5 + 9f89c55 commit 9b12bed
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,9 @@ public override void prepareForUse()

public override void tick( float totalElapsedTime )
{
var easedTime = _easeFunction( totalElapsedTime, 0, 1, _ownerTween.duration );
var value = Mathf.Lerp( _startValue, _diffValue, easedTime );
var easedValue = _easeFunction( totalElapsedTime, _startValue, _diffValue, _ownerTween.duration );

_target.SetFloat( _materialPropertyName, value );
_target.SetFloat( _materialPropertyName, easedValue );
}

}

0 comments on commit 9b12bed

Please sign in to comment.