Jump to content

pointerDown lag on mobile?


gaelbeltran
 Share

Recommended Posts

Hello,

 

I've come across a problem.

Here's a simple implementation of what I'm doing:

http://www.babylonjs-playground.com/#1PHXFI

 

Basically, when I'm on my desktop, and I click the screen, the function gets executed immediately and my player moves. But on mobile it takes almost a second after touching the screen for the function to get executed. Is that how pointers work? Is there a way around that?

Link to comment
Share on other sites

@davrous I found the solution!

I was investigating the 300ms delay on mobile devices and found this old blog post that talks about it:

http://developer.telerik.com/featured/300-ms-click-delay-ios-8/

<meta name="viewport" content="width=device-width, user-scalable=no">

You just need to add this tag to your html file to prevent mobile devices from waiting for zoom pinches:

Maybe we should add it to the documentation since it isn't very obvious and instant reaction on touch actions is very important in most games.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...