myRectangle:setReferencePoint(display.BottomCenterReferencePoint) is causing a physics bug where the collision does not occur where expected. The object collides for some time prior to the collision event being triggers
have reported as bug
-- Version 2013.1178 (2013.8.2) local physics = require( "physics" ) physics.start() physics.setGravity(0, 0.5) physics.setDrawMode( "hybrid" ) -- SETUP OBJECTS local crate2 = display.newRect(0,300,600,60) local myRectangle = display.newRect(180, 120, 90,90) myRectangle.rotation = -80 myRectangle:setReferencePoint(display.BottomCenterReferencePoint) -- \<=== TRIGGERS BUG -- ADD PHYSICS physics.addBody( crate2, "static" ) physics.addBody( myRectangle, "dynamic" ) -- TURN OBJECT RED WHEN IT HITS myRectangle:addEventListener( "collision", function(event) myRectangle:setFillColor(200, 0, 0) end )