W
I also think lerp is better but the effect is the opposite, very fast at the beggining and slower after. If you want to do by your way, faster on each iteration, the if could be something like thisI want to increase or decrease the object size over time, so how to write code? please help me, very thanks!View attachment 16699
if ………………….? What to write here?
{
image_xscale *= 1.5;
image_yscale *= 1.5;
}
var target_scale = 5;
if (image_xscale < target_scale)
image_xscale *= 1.5;
else
image_xscale = target_scale;
image_yscale = image_xscale;
image_xscale = target_scale
image_xscale = target_scale*-1