Pryme8 Posted July 23, 2018 Share Posted July 23, 2018 http://www.babylonjs-playground.com/#GI1F90#47 when trying to debug this with touch interaction, it seems like I have not set something up correctly. I am testing on an iPhone 6s and nothing happens. I can manually bind for touch events on the dom context, but was wondering what our convention is. Also noticed touching the playground examples link does nothing as well. Quote Link to comment Share on other sites More sharing options...
Guest Posted July 24, 2018 Share Posted July 24, 2018 Well what is the expected outcome? It seems to not work even with mouse (at least visually) From a quick look, it seems that you use OnPointerObservable which is the expected way of working with mouse/touch Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted July 24, 2018 Author Share Posted July 24, 2018 Click and drag on the screen starting from the bottom and release at some point up from where you started. and you will 'throw; something and also see the input path for a little bit on the screen. Do it at different speeds. I cant get it to respond at all to touch. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted July 24, 2018 Author Share Posted July 24, 2018 Yup its confirmed the iPhone ignores the touches http://www.babylonjs-playground.com/#GI1F90#47 should alert "TOUCHED" when I touch the canvas on my phone. *UPDATE* hmm it does in fullscreen mode. All the events are happening, but it seems like something is not happening. I bet its my event.clientX stuff. this.points.push( ((new BABYLON.Vector3(e.event.offsetX/canvas.width, (canvas.height - e.event.offsetY)/canvas.height, 0)).scale(2.0)).subtract(new BABYLON.Vector3(1.0, 0, 0)) ); this seems to push NAN's on the iPhone... odd. *UPDATE* got it... I forgot offsetY and X are not on iPhones o_O... woot this actually works really well with touch. Quote Link to comment Share on other sites More sharing options...
Guest Posted July 25, 2018 Share Posted July 25, 2018 hahaha good catch! 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.