How would you convert an image to a spritesheet without sacrificing coding for the image

Ok so I have a code for a sprite sheet as well as an image

local sheetData = { width=50, height=28, numFrames=4, sheetContentWidth=200, sheetContentHeight=28 } local mySheet = graphics.newImageSheet ( "pengs.png", sheetData ) local sequenceData = { { name = "pengFly", start = 1, count = 4, time = 400, loopCount = 0, loopDirection = "foward" } } local animation = display.newSprite( mySheet, sequenceData) animation.x = 80 animation.y = 201 animation:play() peng = display.newImage(sceneGroup, "peng.png", 80, 201) physics.addBody(peng, "dynamic", {density=.18, bounce=0.1, friction=.5, radius=55})

What I want to do is apply the properties of the image to the sprite sheet like the physics.addbody to the sprite while getting rid of the image altogether

How would I go about doing that

I am not 100% sure I follow you, but in order to add a physics body to the sprite, you simply do the same thing to the local animation as you did with peng.

 

physics.addBody(animation, "dynamic", {density=.18, bounce=0.1, friction=.5, radius=55})

thanks yo

I am not 100% sure I follow you, but in order to add a physics body to the sprite, you simply do the same thing to the local animation as you did with peng.

 

physics.addBody(animation, "dynamic", {density=.18, bounce=0.1, friction=.5, radius=55})

thanks yo