Hi
Ive been working on a simple game where you controller a character who avoids water drops that drop from the sky.
For some reason, the water drop frequency is getting broken when running on an actual device (ive set it to drop every 0.25ms) - There are some periods where no drops are comming for some reason.
this is the code which handles the drops:
local function spawnWater() -- create sample item local waterSize = math.random( 20, 26 ); local water = display.newImageRect( "images/water.png", waterSize, waterSize \* 1.25 ); water.id = "water"; physics.addBody( water, { isSensor = true, filter = { categoryBits = 16, maskBits = 1 + 2 } }) water.gravityScale = math.random( 0.8, 1) -- position item randomly within set bounds water.x = math.random( water.contentWidth, \_W - water.contentWidth ); water.y = -( water.contentHeight ); -- add item to spawnedObjects table for tracking purposes table.insert( spawnedObjects, water ); end
Someone has any idea why such as thing could happen? thank you very much