Answer the question
In order to leave comments, you need to log in
Guys, I have a question, I'm making a game for WebGL. Does it handle WebGl touch correctly from a phone?
Or there are some pitfalls. Why am I asking, if you play on the site through a PC everything works fine. But if you play through the phone on the site, then it turns out that in one click the character manages to apply the jump force several times. I fixed it and made a switch to ios to check through the phone before uploading to the site. And it also works well on the phone, but when uploaded to the site, the problem remained.
Here is the touch verification code
if(Input.touchCount > 0 && _isGround )
{
Touch touch = Input.GetTouch(0);
switch(touch.phase)
{
case TouchPhase.Began:
Jump();
break;
case TouchPhase.Moved:
break;
case TouchPhase.Ended:
break;
}
}
Answer the question
In order to leave comments, you need to log in
Suddenly, someone will collide, did a reload of the jump and it all worked)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question