D
D
Danil Samusev2021-12-10 21:31:46
Lua
Danil Samusev, 2021-12-10 21:31:46

How to implement a smooth change of a variable (float)?

Since there is such a function in my main language, but not in Lua - and the search result did not give anything, I turn to knowledgeable people here. I have no idea how to implement it.

UPD: Smooth change should be completed within a certain time interval

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasily Melnikov, 2021-12-16
@BacCM

Divide the amount of smooth change by dividing the time interval. Check the time and change the value. It is hardly fashionable to attribute this to Lua as a language

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question