Hundreds of features to explore
Games made in Construct
Your questions answered
Trusted by schools and universities worldwide
Free education resources to use in the classroom
Students do not need accounts with us
What we believe
We are in this together
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
I want to adjust height of a sprite.
It looks like this
--- Set Height
How do I make it framerate independent.
I think the blog using lerp with delta-time covers this, since shrinking by 1% every frame is the same as lerp(height, 0, 0.01).
I am not sure if I am getting it correctly.
If we are shrinking by 1% it would look like this?
If we are increasing by 1% it would be this?
Develop games in your browser. Powerful, performant & highly capable.
lerp(height, 0, 0.01) In that height is always changing.
if you said lerp(originalheight, 0, 0.01) it would never change
Can someone that is good with maths verify if the formulas I am using are correct when increasing and decreasing height that is frame rate independent? I think it might be incorrect.
Decrease by 1%
Increase by 1%
Not good at math, but if I understood what you need correctly then here's the answer:
If you want to add exactly 1% of original Image Width (change plus to minus to decrease)
If you want to add 1% of Current Width (change multiply to divide to decrease)
I'm thinking they should just use the Tween behavior.