Level Helper World Co-ordinates to Screen touch Cordinates

Hi does anyone know how to display an object at the location of touch in a Level helper level of say 320 by 3200.

I am having problems translating the screen co-ordinates to world co-ordinates.

My player is constantly jumping up and down so this code is not working.

local screenHeight = display.contentHeight
cloud3.x = event.x
screenNo = math.round( player.y/screenHeight )
cloud3.y = event.y + ((screenNo*screenHeight)-320);

return true
end
end

Runtime:addEventListener("touch", touchListener)

The following code is keeping the player in view

if player.y < -localGroup.y + 240 then
localGroup.y = -(player.y - 240)

Thanks

Can't you use the touch event coordinates and move the player there during the Touch Event Listener? It should be the same regardless of LevelHelper, just getting your reference to your player might be different.

views:1633 update:2011/12/29 9:44:01
corona forums © 2003-2011