Hy everyone, I have a game that I got from corona sdk source code sample games
dragPlatform – the one with the house and the books.
I can touch any object and move it anywhere – it work perfect
I just copy a piece of code to add a new object
a crate2
the crate that comes with the game is this
crate = display.newImage( "crate.png", 90, 90 ) group:insert(crate) physics.addBody( crate, { density=3.0, friction=0.4, bounce=0.2 } )
and my code is this
crate2 = display.newImage( "crate.png", 90, 90 ) group:insert(crate2) physics.addBody( crate2, { density=3.0, friction=0.4, bounce=0.2 } )
on top I have declare both variables
local crate local crate2
I can see the other crate fine, but I can not move it
one I touch on it it will not respond,
what am I missing?
thanks for your help