how can I make the object go where I tap instead of the same place every time? here is my code.
tapTothrow = function (event)
if event.phase == “began” then
moneyBag = display.newImageRect(gameGroup,“play.png”,80,80)
moneyBag.x = player.x + 50
moneyBag.y = player.y
physics.addBody(moneyBag,{radius=35})
moneyBag:setLinearVelocity(400, 0)
end
end
Runtime:addEventListener(“touch”,tapTothrow)