DylanD Posted August 23, 2018 Share Posted August 23, 2018 Hey everyone, I have a strange problem, when I am playing my game on mobile and I hit and hold a Gui button then slide my finger off of it, the moment I start to slide my finger it seems to call the onPointerUpObservable. This doesn't happen on my computer, and I can't even recreate it in playground for some reason. Im stumped at what could be causing this. Here is a playground to illustrate what I have, but not the exact problem as even in the playground on my phone it would not call onPointerUpObservable: https://www.babylonjs-playground.com/#WYNFSG#2 Any ideas what could be going wrong? im not using hammerjs or any touch plugin since they're only Gui buttons and nothing else. Which seems to work fine on playground. Im not even sure how to label this problem properly. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted August 23, 2018 Share Posted August 23, 2018 What phone you using? iPhone 6s works fine with the PG. Quote Link to comment Share on other sites More sharing options...
DylanD Posted August 23, 2018 Author Share Posted August 23, 2018 Im using a pixel, however I only ever seem to encounter the problem through my game on mobile. I haven't been able to recreate it yet. Thanks for testing the playground though. I'm still trying to recreate the problem. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted August 23, 2018 Share Posted August 23, 2018 Ill hit my lady up and have her test on the pixel 2, might not be till later today though. Quote Link to comment Share on other sites More sharing options...
DylanD Posted August 23, 2018 Author Share Posted August 23, 2018 but I haven't even recreated the problem yet ? Thanks though! Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted August 23, 2018 Share Posted August 23, 2018 Oh damn, ok just read that the problem is not being simulated in the PG. My bad, well it works on a pixel 2 as well (which I guess is irrelevant now, lol) Let me know when its recreated. Also check which versions of the libs you are using on your game version. DylanD 1 Quote Link to comment Share on other sites More sharing options...
DylanD Posted August 23, 2018 Author Share Posted August 23, 2018 Just now, Pryme8 said: Oh damn, ok just read that the problem is not being simulated in the PG. My bad, well it works on a pixel 2 as well (which I guess is irrelevant now, lol) Lol. Thanks though, hopefully I can get the problem recreated XD Quote Link to comment Share on other sites More sharing options...
DylanD Posted August 23, 2018 Author Share Posted August 23, 2018 Some more info: I'm using this in my html: <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> <script>document.addEventListener('contextmenu', event => event.preventDefault());</script> Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted August 23, 2018 Share Posted August 23, 2018 Ooo, I know do you have touch action turned off on the canvas? and do you have pep included? DylanD 1 Quote Link to comment Share on other sites More sharing options...
DylanD Posted August 23, 2018 Author Share Posted August 23, 2018 I do not have pep, and I don't believe I have touch action turned off on canvas, not sure what that is, should I? Quote Link to comment Share on other sites More sharing options...
brianzinn Posted August 23, 2018 Share Posted August 23, 2018 have a look here for touch-action and PEP: https://doc.babylonjs.com/babylon101/first#html-template DylanD 1 Quote Link to comment Share on other sites More sharing options...
DylanD Posted August 23, 2018 Author Share Posted August 23, 2018 So all I did was add this little piece of script: <script src="https://code.jquery.com/pep/0.4.1/pep.js"></script> <canvas id="renderCanvas" touch-action="none"></canvas> Now everything works really well! Thanks @brianzinn Also thanks @Pryme8 for trying XD Quote Link to comment Share on other sites More sharing options...
brianzinn Posted August 23, 2018 Share Posted August 23, 2018 pryme8 had the solution, i just sent the doc link. not sure why our docs don't have 0.4.3, though. DylanD 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted August 23, 2018 Share Posted August 23, 2018 I'll fix that! DylanD 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted August 23, 2018 Share Posted August 23, 2018 Yeah I kinda assumed from his description of what was happening that it was the document trying to move under the touch-action. DylanD 1 Quote Link to comment Share on other sites More sharing options...
DylanD Posted August 24, 2018 Author Share Posted August 24, 2018 Bad news, I built it and tried it through messenger and the fix doesn't work. Now I bet it is because Facebook is trying to move, or something, idk. Maybe I should install a packaged version of pep instead of calling the link from the html.... Maybe pep is not compatible with whatever Facebook uses as a browser? Quote Link to comment Share on other sites More sharing options...
DylanD Posted August 24, 2018 Author Share Posted August 24, 2018 Facebook does not support server side logic, that sounds like it could be the problem, any ideas how to get around this? Maybe I could put it into the javascript somehow? Edit: query is client side so maybe not? Quote Link to comment Share on other sites More sharing options...
DylanD Posted August 24, 2018 Author Share Posted August 24, 2018 Any ideas? Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted August 24, 2018 Share Posted August 24, 2018 thats rough, someone else might have to take the lead on this answer. Quote Link to comment Share on other sites More sharing options...
DylanD Posted August 24, 2018 Author Share Posted August 24, 2018 5 minutes ago, Pryme8 said: thats rough, someone else might have to take the lead on this answer. Oh no I was hoping you wouldn't say that. Was I right though do I need server side logic for Pep? Quote Link to comment Share on other sites More sharing options...
brianzinn Posted August 24, 2018 Share Posted August 24, 2018 PEP is all client-side, only the file is downloaded from a server. I haven't looked at all into FB games - there is a forum on this website specific for FB games, though. This problem does not appear to be babylonjs specific, so you probably need some FB expertise. I have never installed any facebook App, but I have used their Karmel browser in GearVR and it was not the best experience. Good luck! Quote Link to comment Share on other sites More sharing options...
DylanD Posted August 24, 2018 Author Share Posted August 24, 2018 22 minutes ago, brianzinn said: PEP is all client-side, only the file is downloaded from a server. I haven't looked at all into FB games - there is a forum on this website specific for FB games, though. This problem does not appear to be babylonjs specific, so you probably need some FB expertise. I have never installed any facebook App, but I have used their Karmel browser in GearVR and it was not the best experience. Good luck! Thanks I will check there! Quote Link to comment Share on other sites More sharing options...
DylanD Posted August 24, 2018 Author Share Posted August 24, 2018 Link to the other post: Quote Link to comment Share on other sites More sharing options...
DylanD Posted August 27, 2018 Author Share Posted August 27, 2018 Fixed by adding touch-action: none; to my css file, in the html, body{} check here for more details: On 8/24/2018 at 12:03 PM, DylanD said: Link to the other post: GameMonetize and Pryme8 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.