Hello!
I'm having issues switching through animations with Corona SDK. I've figured out how to switch the animations when needed, however the end result is incorrect. The bones are stuttering, incorrect frame order and incorrect positioning. Thanks.
function update(e)
local currentTime = e.time / 1000
local delta = currentTime - lastTime
lastTime = currentTime
animationTime = animationTime + delta
player:updateWorldTransform()
if(aniState == 1) then
aniHolder[1]:apply(player, animationTime, true)
elseif(aniState == 2) then
aniHolder[2]:apply(player, animationTime, true)
elseif(aniState == 3) then
aniHolder[3]:apply(player, animationTime, true)
end
if(playerStun == false and pGrounded[1] == false) then
aniState = 3
elseif(playerStun == false and pGrounded[1] == true) then
aniState = 1
end
if(playerStun == true) then
aniState = 2
end
end
EDIT:
I'd also like to mention I'm trying to get each animation to play in a loop.