Create a Shake Effect on a Object

Hi Folks,

I have a clock object that I want to apply the Shake effect with transition.from or any easing equations.

I know there are some easing equations with bounce and elasticity.

Are there any equations that will provide a shake effect on a object.

Thanks

[import]uid: 120979 topic_id: 21003 reply_id: 321003[/import]

Here you go :

The oncomplete is optional

[code]
local function doShake(target, onCompleteDo)
local firstTran, secondTran, thirdTran

–Third Transition
thirdTran = function()
if target.shakeType == “Loop” then
transition.to(target, {transition = inOutExpo, time = 100, rotation = 0, onComplete = firstTran})
else
transition.to(target, {transition = inOutExpo, time = 100, rotation = 0, onComplete = onCompleteDo})
end
end

–Second Transition
secondTran = function()
transition.to(target, {transition = inOutExpo, time = 100, alpha = 1, rotation = -5, onComplete = thirdTran})
end

–First Transtion
firstTran = function()
transition.to(target, {transition = inOutExpo, time = 100, rotation = 5, onComplete = secondTran})
end

–Do the first transition
firstTran()
end [import]uid: 84637 topic_id: 21003 reply_id: 82966[/import]

Wow, that is too cool! Thanks a bunch Danny. [import]uid: 52208 topic_id: 21003 reply_id: 83045[/import]