Does raycasting register hits with a sprite sheet image that has been added as a physics object?
I have a sprite animation which I have added a physics body to it, as follows:
local sheetData={width=100, height=90, numFrames=30, sheetContentWidth=1000, sheetContentHeight=270} local mySheet=graphics.newImageSheet("object.png", sheetData) local animation=display.newSprite(mySheet, {start=1, count=30, time=2000}) physics.addBody(animation, "static") animation.x=200 animation.y=200 animation:play()
I created a flag on the animation object such as if it gets hit by a ray cast, it will return true. I have tried it with a normal png file
imageOne=display.newImage("box.png") physics.addBody(imageOne, "static")
and it always returns true, but when I replaced the normal png file with a sprite sheet image (as with the first block of code above), it always returns false.