If this is the code I’m using to move my object:
[lua] local moveObj = function(e)
if e.phase == “moved” then
slBumper02.y = e.y
end
end
slBumper02:addEventListener(“touch”, moveObj)[/lua]
What code would I need to use to make is stop moving when it collides with:
[lua] local tWall = display.newImage(“HoriWall.png”)
tWall.y = -5
physics.addBody(tWall, “static”, {bounce = 0})
localGroup:insert(tWall)[/lua] [import]uid: 208120 topic_id: 34812 reply_id: 334812[/import]