"Grow" in size code is too fast


I'll describe how to make a sprite grow in size smoothly as. the Grow value is too

If you start with a sprite size that's 100
When arrow is tapped
Grow by size multiplied by 1.1

This makes a sprite grow by 10 percent when tapped.
When you make a sprite in the distance grow bigger to look like it's getting closer, this code will help.

Just using the normal grow code and increasing by 1 makes the sprite grow too quick when small and grow too slow when large because only a number is being used and not a percentage like 1.1 which is 10 percent of the sprites current size.


Awesome tutorial! I'm sure me, and so many other people will use this! :clap::smile:


Great tutorial!

I just do

Repeat times ____ :
Set size (size as a % + 1)

Same concept lol


No, size plus 1 won't work realistically

If a size is 1 and you add 1, the size has doubled.




Meh. It seems to work fine for what I need :sweat_smile: ¯\⌒(ツ)⌒/¯


I was working on a first person 3d sort of game and had some trees in the distance behind other trees.

When the trees in front grew to a larger size, the speed they grew by got slower and the smaller trees behind grew bigger quickly.
This didn't look very real at all, so i had to make the trees grow at a smooth rate.


Fair enough. I can see that this is more useful - particularly in some situations like yours :wink:

I just don't generally make projects where this could be applied so my input here is uselos...


I kinda get it...but this looks good!


I appreciate your comments and ideas.
Everyone codes differently to get the same effect sometimes.


Thanks and yeah that's true.

That's the cool thing about coding: you don't always have to have a fixed way of doing things!