There might be an easier and more intuitive way to do this, but…
I am trying to make a ground, say with
local ground = display.newRect(0,150,320,10)
ground:setFillRect(255,255,255)
physics.addBody(ground, "static", { friction=0.5, bounce=0.0 })
Now that is one solid piece of ground and any “body” that will interact with this will stop instantly (unless it has a bounce factor)
now I want to create a hole in the ground, a trigger if you may, that will make the body fall through, I tried to use collisions by adding a hole in the ground like
local hole = display.newRect(0,149,320,11) -- 1 pixel above and covers the ground
hole:setFillColor(0,0,0)
now on the onCollision event I did manage to detect the collision between the object and the hole, but how do I make it fall through?? (cheat and position it down by 10 pixels so that it just falls?)
cheers,
Jayant C Varma [import]uid: 3826 topic_id: 3051 reply_id: 303051[/import]