- Joined
- Jul 9, 2008
- Messages
- 1,102
I found a simplified equation for representing a bouncing motion on StackExchange.
EDIT:
The solution in Jass (Thanks to MyPad), where
y = height
x = the distance from the starting point
bounces = the number of bounces
maxheight = the max value of y
EDIT 2:
Had to play around with the equation a bit in a calculator, but this gave me a really nice bouncing animation for anyone who needs, where 250 is the desired height of the bounced Special Effect.
My question is does anyone know if there is a way to represent the number "e" in WE or Jass without hardcoding its value? Haven't seen anything in the triggers that suggest it exists.y=(e^-x)*abs(4cos(5x))
EDIT:
The solution in Jass (Thanks to MyPad), where
y = height
x = the distance from the starting point
bounces = the number of bounces
maxheight = the max value of y
y =( Pow(bj_E, (-1* x) ) )*RAbsBJ( maxheight * Cos( bounces * x))
EDIT 2:
Had to play around with the equation a bit in a calculator, but this gave me a really nice bouncing animation for anyone who needs, where 250 is the desired height of the bounced Special Effect.
Last edited: