1 decade ago
by MikeH
If I define a touch area using bindTouchArea, I understand it makes a new native iOS button and places it on the screen. Is there a way of getting the coordinates of where the button was touched? I want to have a fire button that will let me know the angle of the tough in relation to the center of the button. What changes would I have to make to get the x,y coords passed back to my javascript callback function?
Unless you're familiar with Objective-C, I'd recommend just switching up how you go about this and make your buttons be entities on your screen instead. Just bind ig.KEY.MOUSE1 and then you can get state for that, as well as ig.input.mouse.pos.
Reason: the UIButton class doesn't have any default way of letting you know exactly where it was touched, just that it was touched. You'd end up having to write your own custom button class for this.
1 decade ago
by MikeH
I guess what I'm really asking is how does multitouch work with iOSImpact? Can I get access to the x,y coords for each touch? Because if I can receive information about more than one touch I can do the rest :)
Did you ever figure out how to get the x,y coords of multitouch in iOSImpact?
Page 1 of 1
« first
« previous
next ›
last »