I have a sprite sheet of a man running, and I have made the physics body a polygon shape. However, now it will not bounce, move or roll or anything, although it is still affected by gravity. Any solutions to this? The code is:
local sheet1 = sprite.newSpriteSheet( "man.png", 150, 200 )
local spriteSet1 = sprite.newSpriteSet(sheet1, 1, 6)
sprite.add( spriteSet1, "running", 1, 6, 300, 0 )
local man = sprite.newSprite( spriteSet1 )
man.x = 100;man.y = 10;man.xScale =.2;man.yScale =.2;man.rotation = 0
man:prepare("running")
man:play()
manshape = {-16,-28, 18,-28, 18,0, 12,0, 12,30, -18,30}
physics.addBody(man, {friction = 0.1, density = 1, bounce = 1, shape=manshape})
physics.addBody(bottom, "static", {density = 1, friction = 0.1, bounce = 1})
man.bodyType = "dynamic"
[import]uid: 116264 topic_id: 24254 reply_id: 324254[/import]