HTML5 screen / touch position problem
Hi Guys i was just about to publish my app to the appstore and html5 and i noticed a little error and was wondering on some advice/help
Ive got a zoom button and several other buttons next to it. When you zoom out (interpolate) all of the buttons also move and also increase in size so that they are still the same size in the same position.
However in the html5 version when zoomed out (i.e screen size is double) then it seems i cant click on the buttons anymore
Its fine in gsviewer and adhoc so its just in the web preview / html5. I obviously need to modify some code but not sure what to do
If it helps it also seems to move the screen across and up becuase my actor on touch works about x pixels and y pixels out (not sure of exact number) so perhaps its the origin that isnt quite lining up right - although collision etc and everything else in the game is fine.
Im just trying to make sure its all ok before i upload as its for a client
Thanks a lot
Ive got a zoom button and several other buttons next to it. When you zoom out (interpolate) all of the buttons also move and also increase in size so that they are still the same size in the same position.
However in the html5 version when zoomed out (i.e screen size is double) then it seems i cant click on the buttons anymore
Its fine in gsviewer and adhoc so its just in the web preview / html5. I obviously need to modify some code but not sure what to do
If it helps it also seems to move the screen across and up becuase my actor on touch works about x pixels and y pixels out (not sure of exact number) so perhaps its the origin that isnt quite lining up right - although collision etc and everything else in the game is fine.
Im just trying to make sure its all ok before i upload as its for a client
Thanks a lot
Comments
(ALL)
When actor overlaps with mouse pointer AND
When mouse button is down
blah blah blah
Hope this helps.
I might have to upload so it can be looked at / maybe ill send to support
so its my actual camera resize thats causing a problem or when its resized and the screen is made twice as big then the touch position in html5 isnt doubled also
on the iOS device its fine - so its just through the web preview
thanks for the help btw :-)
in your mouse constrains try this for x:
constrain to "scene.camera.origin.x + (mouse.position.x*(scene.camera.width/480))"
try this for y:
constrain to "scene.camera.origin.y + (mouse.position.y*(scene.camera.height/320))"
if i could remove stuff from the arcade after then id just try publishing to html5 just to check if its actually a bug in the web preview in the creator and not in teh actual html5 finish - but i want it right before i show the client.
Its tricky cos i have a scrolling side level - physics shooter so camera origin changes a lot
game is fine if you dont zoom
ive mailed support with a zip of my gs project files
appreciate your help btw thank you