I need help getting this to work with zooming on an image. I handle all the touches with a variable ‘td’.
td.x = (td.x*screensize)+((origin.x-screenpos.x)/screensize) td.y = (td.y*screensize)+((origin.y-screenpos.y)/screensize)
This works if the screensize is 1, that’s when the screen isn’t zoomed then say for instance a screensize of 0.1 is 10x zoom. The screenpos is the dynamic position of the screen image when being panned around, the origin is where the screen lies to begin with, this works for translating touches if the screensize is 1, but anything lower seems to not give me the right results, I’m guessing its something small that needs changing but I just can’t figure it out. How would I go about translating the touches to an image that has been moved and zoomed?