Apply the physics object to the group that contains the two images.
require("physics") physics.start() physics.setGravity(0,0) physics.setDrawMode("normal") --physics.setDrawMode("hybrid") -- this is really useful for debugging local myGroup = display.newGroup() local imageA, imageB = display.newImage( myGroup, "imageA.png" ), display.newImage( myGroup, "imageB.png" ) physics.addBody( myGroup, "dynamic", { friction=.2, bounce=4, density=1 } )
This is only example code, of course, but if you put it in a function and return the myGroup you have the start of useful code. It’s good because you can still apply changes to the images inside the myGroup display group.