Build 1058 - Adding A Collision Handler Causes (Paused) Physics To Start

In build 1058 (perhaps in earlier builds also), if a physics body is created and a collision handler attached, the physics simulation starts, even if it was previously paused.

I can confirm that this bug was not present in build 1054 and earlier.

I have reported this as a bug.

 

Sample code to show this:

require "physics" physics.start() physics.setDrawMode("hybrid") physics.pause() local box = display.newRect(display.contentCenterX,100,100,100) physics.addBody(box) --Commenting this collsion handler will cause the physics to actually be paused. If it is active however, the physics simulation will start, even though it was paused on line 4 and no subsequent calls to physics.start() were made box:addEventListener("collision",function() end) --Another box, just to show that all physical objects are affected by this bug local box2 = display.newRect(display.contentCenterX,300,300,50) physics.addBody(box2)