I have a code like this:
[code]function new()
local w = display.contentWidth;
local h = display.contentHeight;
local physics = require(“physics”);
physics.start();
local localGroup = display.newGroup();
local block;
local wall;
local function blockCreator()
block = display.newRect(0, 0, w, 100);
block.x = math.random(0, w); block.y = math.random(-20, 0);
physics.addBody(block);
localGroup:insert(block);
end
timer.performWithDelay(1000, blockCreator, 2);
wall = display.newRect(0, 0, w, 100);
wall.x = w/2; wall.y = h/2;
localGroup:insert(wall);
return localGroup;
end
[/code]
I want the blocks created by the function blockCreator() to pass behind the wall. What am I supposed to do to make it happen? [import]uid: 162818 topic_id: 35685 reply_id: 335685[/import]
[import]uid: 162818 topic_id: 35685 reply_id: 142118[/import]