Hai, I have to create physics body with sprite animation, My code is
local function stumpAnimation()
local grpStump = display.newGroup()
spriteStump = display.newSprite( stumpImageSheet , {frames={1,2,3,4,5,6,7,8,9,10,11}, time=1000, loopCount=0 } )
spriteStump.x= 240
spriteStump.y= 480
grpStump:insert( spriteStump )
spriteStump:play()
physics.addBody( grpStump, “static”, { density=3.0, friction=0.0, bounce=0.0 } )
end
stumpAnimation()
My problem is i see only animation not body in debug mode, but when i change the body static to dynamic that body falls down. No collision with another body.