I am trying to animate a rollercoaster. For now I have a cube following the Bezier path of the track. I need the cube to change its follow speed based on its height. (the higher it is, the slower it is).
How do I control follow speed based on the height of the object? Keyframing is not an option as the relationship is too complex.
I tried this with animation nodes, however height is affected by position on curve, which is affected by speed. Trying to control speed by height creates a paradoxical loop. Is there a way (in animation nodes or otherwise) to use the cube's current height, to determine its rate of change of position on the curve in the following frame?
Sidenote: I have an expression for speed (from physics energy formulas): speed = (200 - (2 x height))^0.5