Move object to the opposite direction by drag

How to move the object to the opposite direction where I drag ?  For example ,when I drag left the object will move to the right .

local player = display.newRect(150,200,50,50) local function onTouch(e) if e.phase == "began" then player.markX =player.x player.markY = player.y elseif e.phase == "moved" then local x = (e.x- e.xStart) + player.markX local y = (e.y - e.yStart) + player.markY player.x = x player.y = y elseif e.phase == "ended" then end end Runtime:addEventListener("touch",onTouch)

Don’t add the touch listener to the ‘drag object’.  Have the listener on a proxy object and have the proxy move the ‘drag object’.

Don’t add the touch listener to the ‘drag object’.  Have the listener on a proxy object and have the proxy move the ‘drag object’.