Hi guys, is there any sample code can show how to create collision between two animated sprites? Currently I can do it for the images but for the animated sprites, I cannot find any results in google. Let’s say, you have FirstObject and SecondObject, and collision occurs when FirstObject touches with SecondObject. How I can make 2 animated sprites collision? Thanks guys.
-- First Object firstObjectImageSheet = graphics.newImageSheet("firstObject.png", { width = 80, height = 104, numFrames = 6 }) firstObject= display.newSprite(firstObjectImageSheet, { name="firstObject", start=1, count=6, time=1000, loopCount=0, loopDirection="bounce" }) -- Second Object secondObjectImageSheet = graphics.newImageSheet("secondObject.png", { width = 80, height = 104, numFrames = 6 }) secondObject= display.newSprite(secondObjectImageSheet, { name="secondObject", start=1, count=6, time=1000, loopCount=0, loopDirection="bounce" })