Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by puzzleschool

I'm trying to get multitouch working for an iphone/ipad game, but can't seem to get it to work. I've tried using the MultiTouch plugin, but it seems to have bugs (or maybe I'm just using it wrong). Specifically it's reporting addEventListener to be undefined on ig.system.canvas.

Has anyone been able to get multitouch working through iOSImpact?

1 decade ago by Asingh1313

Hi @puzzleschool did you managed to implement multitouch , I'm facing the same problem. totally confused over how to implement multitouch behavior.
I'm trying it with ejecta but don't know how to do this.

Is anyone have any idea about how to get multitouch working on ejecta?

1 decade ago by Joncom

You both seem to have had trouble with getting multi-touch working on iOS. How about not on iOS? Can you get things working just in the browser?

1 decade ago by Asingh1313

Hi @Joncom i have tried with "multitouch"http://impactjs.com/forums/code/multitouch plugin its working in desktop with single click and when I integrated my game with ejecta then its not working

key binding
ig.input.bind( ig.KEY.MOUSE1, 'mouseLeft' );

for ( var t in ig.input.touches ){
       var p = this.ClickCoordinates(ig.input.touches[t].x ,ig.input.touches[t].y );
                  this.mouse_x = p.x;
                  this.mouse_y = p.y;
		}

I am using above code to get coordinates of touch, its not returning anything on iPad,I think touch event is not being triggered.
while in desktop browsers there is no multitouch its only single click ( that is working I can get coordinates with ig.input.mouse.x ) so I'm not able to test multitouch on desktop.
so I have doubts if this multitouch plugin works with ejecta or not ? and how can i implement multitouch functionality in ejecta?

1 decade ago by Joncom

You can still test multi-touch functionality outside of Ejecta by running the game on your iOS device but using the browser instead. Does the multi-touch fail when using iOS Safari?

Just trying to get an idea of whether the plugin straight-up does not work for you, or if Ejecta is somehow having an issue with it...

Edit: For what it's worth, I've been able to get multi-touch working on iOS using that same plugin, so the plugin should be able to work for you too. Example

1 decade ago by Asingh1313

plugin is working normally , but it seems ejecta having some issue.

I have seen ejecta has different event for touch inputs mousestart mousemove and mouseend I think to achieve multitouch I've to use these events.

1 decade ago by Joncom

In that case, you may want to look into Touch Buttons and see how they capture/handle touches. More info here.

1 decade ago by Asingh1313

yeah I am trying the same,
Thanks for the help!

1 decade ago by stillen

My buttons will work if you touch them in ejecta, but not if you slide over them. Basically its on the touchdown and not the touch/mouse over event.

Also I didn't see in the documentation anywhere, but with the touch.js if I don't call buttons.align() the buttons all just sit on the top of the screen. Thought that should be updated or noted somewhere.
Page 1 of 1
« first « previous next › last »