Add another type of shake animation
d87 opened this issue ยท 4 comments
Suggestion to add this function to default list of translation animation types:
function(progress, startX, startY, deltaX, deltaY)
local easeMul = sin(progress*90)
local amX = deltaX * easeMul
local amY = deltaY * easeMul
local moveX = random(-amX, amX)
local moveY = random(-amY, amY)
return startX + moveX, startY + moveY
end
It's dumb but pretty effective
If you do a pull request (which shouldn't be too hard) and show a few videos/gifs how it looks like, that would probably raise the chances by a good amount.
I don't like that it randomly jumps around and thus depends on frame rate.
The idea of having a eased in random shake is imho something that has merit.