Using mouse position to set panorama hotspots #1565
Answered
by
drcmda
dpomazanov
asked this question in
Q&A
Replies: 1 comment
-
function Dome({ name, position, texture, onClick }) {
return (
<group>
<mesh onClick={e => console.log(e.point)}>
<sphereGeometry args={[500, 60, 40]} />
<meshBasicMaterial map={texture} side={THREE.BackSide} />
</mesh> |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
dpomazanov
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Using the answer to discussion #665 (https://codesandbox.io/s/r3f-sky-dome-wbrfs), hotspots are set using the position attribute within the store. Is there a way to set hotspots using a mouse click on the canvas? In other words, how would you access the 3D coordinates of the mouse position while navigating the panoramic image?
Beta Was this translation helpful? Give feedback.
All reactions