iOS Safari not working when clicked a 3D button

I have a few 3D Button, it was actually a 3D entity with collision, i used ray-cast to pick those object on touch or mouse down event, after clicked 3D button, it would fire an event, and the event will call another function open() to implement the

However, it only works when click on a 2D button element. the 3D button fire event is not working at all even both 2D button and 3D button are calling the same function.

Any suggestions ? is not supported on Safari - Web APIs | MDN

Check Stackoverflow for workarounds on this. I think you might be able to create a <a> DOM element and invoke click on it.

1 Like

Hi @Calvin2274 and welcom! The 2D button works on Safari on my iPhone. The 3D button is not working. Can you share an editor link so someone can take a look?

Thank you.

That’s wired. How come the 2D button works with on iOS Safari but 3D button not working then.

Actually i created a button element and invoked the click()
Will try the DOM element

Tried a element. got his error on iOS Safari

Refused to display ‘’ in a frame because it set ‘X-Frame-Options’ to ‘SAMEORIGIN’.

What method are you currently using to detect if a 3D entity has been clicked? I think using a raycast is the most common way. You will find some more information on the page below.

Collision picking.

but finally, i found another solutions from here:

Since only a 2d button works to call, i tried no longer using collision picking, instead using a hidden UI button on 2D screen and make it follow a target of 3D entity.

If works with a 2D entity it should also work with a 3D entity. I think there was something wrong with the set up of your collision picking.