Picking a mesh is not registering on iOS

Recommended Posts

Hi Everybody!

So I have some hotspots floating around in z space. Each hotspot isPickable = true and each non pickable mesh isPickable = false. When I test on desktop it runs like a dream, but when I test it on mobile devices, the hotspots don't respond to any touch actions/click.

Babylon version is v 2.5.0

I created a PG. The PG works great on desktop and mobile, but the PG is running version 2.6 alpha

Is this something that was adjusted? Am I missing something? Can I change what version of Babylon being used in the PG so I can have a more accurate test?


PG: http://babylonjs-playground.com/#PEJDE#8

Share this post

Link to post
Share on other sites

Thanks for the replies! Yup PEP is included, and yes touch-action="none" is implemented. I can get all the camera controls to work on mobile, but the "pick" still isn't working. I'm starting to suspect a non Babylon related issue. If I figure it out I'll let you all know.....The info might be useful to someone out there right? haha


Thanks again!

Share this post

Link to post
Share on other sites

Hi everyone!

so it turns out I needed to include a 'touchend' event listener as well as a 'click' event listener and remove the following from the "onPointerClick" function:

if (evt.button !== 0) {return;}

PEP is included, but for some reason the touchend events weren't doing their thing (All other touch events appeared to be firing without a problem). I tend to think this is all due to how I'm using the framework with other 3rd party platforms, and there was a conflict.....BUT if anyone else bumps into iOS touch events not being triggered when you have PEP loaded properly AND touch-action="none", give the above a try (it might put a smile on your face)

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.