eg.

As of an event, for the next 2 seconds, using an exponential out curve, reduce the value of Air Resistance from 3 to 0.1

]]>Create an empty object as a dummy.

Set its X position to the incoming rotation speed (3 in this example)

Use a Move to Point behaviour for a duration of 2 seconds with an Exponential Out curve, to move it to 0.1 on the X axis.

Whilst this "action" is running, use it to set the value of the Air Resistance on the desired object.

]]>The problem is that the arbitrary high value (3 in this example) is never going to be the same. It's the rate of spin the character has attained, and can be anything from a very small number to a massive value.

Is it possible to do this pre-calcuation of the required distribution rate, to perform the transition for a specific duration, for things like an exponential, quadratic or cubic curve? Don't worry about trying to answer with a massive visual code, I'm just curious if it's possible to pre-plan. Just a yes or no will give me the incentive to believe it possible.

I'm truly flummoxed by maths.

But can lift heavy things.

]]>THANK YOU!

However, I'm trying to understand how to set a timer to operate on a value for a specific amount of time.

]]>This is an astonishing amount of effort and consideration, and an amazingly powerful demonstration of talent and understanding. I'm overwhelmed!

How long have you been using hyperPad?

Have you used other visual programming environments?

How did you get to conceiving programming visually? I still struggle with it, greatly, finding most programming languages to be easier to conceive within than visual coding... despite the fact that I'm a TERRIBLE programmer.

]]>Hope this can help. ]]>

My question is all about changing the value over time, the exponential out (ease curve) is only used as an example of a type of ease curve... any curve would do, including linear change over time.

How do I read this WITHOUT the exponential stuff, so I can see how to change a value over time?

]]>f(x)=ae^(-x)+c

(probably not exactly what you want). In the case of f(0)=3 and f(2)=0.1, the function would be approximately

f(x)=3.3539e^(-x)-0.3539.

You can use this function as a function of time to use it as a transition between values.

HyperPad timers run at 60/s when you set the duration to zero, to match the target fps. So multiplying the duration of your transition by 60 is the number of times a timer(0) needs to run. You can then divide the current index of the timer (keep track using a box container or attribute) by 60 to get the current time. Putting this time into the function will give a smooth transition.

Unfortunately hyperPad doesn't support exponents, so I've used the 8th tailor polynomial approximation for e^x: 1+x+x^2/2!+x^3/3!+...+x^8/8!.

I used a loop for the factorial and a loop the power of x, both within a loop for each part of the approximation. You can increase the number in the main loop to make it more accurate at the cost of performance. Here's a screenshot (hard to follow):

Here's a download link: http://bit.ly/2zXmKYy (copy, paste into safari).

Note that I'm adding 1 to the output value just so I can display the value using the y position of the base of the square, you wouldn't do this for your air resistance.

]]>