Skip to content
This repository has been archived by the owner on Jun 2, 2023. It is now read-only.

Raycastingpoint NaN on Mobile Device after OnTap #427

Open
oreMno opened this issue May 18, 2023 · 0 comments
Open

Raycastingpoint NaN on Mobile Device after OnTap #427

oreMno opened this issue May 18, 2023 · 0 comments

Comments

@oreMno
Copy link

oreMno commented May 18, 2023

Hi there,
I have an issue on mobile devices, for getting an invalid Raycastingpoint onTap event.

Here, the description:
Project
https://pchen66.github.io/Panolens/examples/panorama_infospot.html
What To Do
Open DevTools on Chrome, set mobile devices and click/tap the panorama. Set a breakpoint on panolens.min.js inside OnTap.
OnTap() is reached after OnMouseDown and no value is defined for a.clientX or clientY, because of touchEvent
this.raycasterPoint.x = (a.clientX - c.left) / g.clientWidth * 2 - 1;
this.raycasterPoint.y = 2 * -((a.clientY - d) / h) + 1;

Do you have any idea how to fix this for mobile device?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant