johnatm / itween

Automatically exported from code.google.com/p/itween
1 stars 2 forks source link

updateTimePercentage value #126

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
This is by no means an issue, but while browsing the code I found the variable 
"updateTimePercentage", that is used in the MoveUpdate/RotateUpdate/...*Update 
functions to multiply the time value by 0.5f.

How come that this value is exactly 0.5f ?

The Update functions make usage of Mathf.SmoothDamp. If I use this function 
directly (without iTween), after the tween time is over the target object is 
approximately at half the distance it should be. I guess that's why the 
updateTimePercentage factor comes in to shorten the time parameter in a way, 
the values reach their goal for sure.

Am I right? Is the value just an approximated factor or is it somehow logically 
calculated?

Thanks for making it clear to me.

Original issue reported on code.google.com by andreas....@netural.com on 8 Jul 2013 at 1:57