I have a very simple, virtually empty scene, so lagging isn't a reason, but when using Mathf.Lerp as follows:
if(Input.GetKeyDown("space")){
grow = true;
}
if(grow){
size = Mathf.Lerp(40.0, 100.0, growthSpeed*Time.time);
}
It skips between 10 and 20 straight away! rather than starting from 40 and counting up it starts immediately between 50 and 60 then continues counting slowly! (growthSpeed is 0.1) and size starts at 40. I don't understand why it's skipping like this! Any ideas?
thanks in advance!
↧