Hi,
I created physics data for each of the characters in my spritesheet and placed it in a shapedefs.lua file,i’ve tried several times but I cant seem to figure out a away to apply the physics data to the sprites.
–Spritesheet
local sheet = display.newImageSheet( “man.png”, {height=128, width=128,numFrames=16})
local sequenceData = { {name=“run”,frames={1,2,3,4,1},time=1000,loopCount=1}, {name=“attack”,frames={1,5,6,7,8,1},time=1000,loopCount=1}, {name=“jump”,frames={1,9,10,11,12,1},time=1000,loopCount=1}
}
local instance = display.newSprite(sheet, sequenceData)
instance.x=0.5*display.contentWidth
instance.y=0.5*display.contentHeight
physics.addBody(instance, “static”, physicsData:get())
the only tutorial on this I’ve cme across uses Magenda’s SpriteGrabber( which doesnt seem to work with the latest build of corona sdk).
How can I get around this?physicsData:get() doesnt seem to accept anything short of a single sprite name