-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Event 'getposition' not triggering? #300
Comments
I'm getting the same problem. When I call VRView.getPosition(), it isn't triggering that callback. It's working on one of their example pages: I have hotspots working, I just need the getPosition to trigure to set the hotspots without messing around. |
Hey Mark, I managed to figure this out, you need to call .getPosition() in a click event handler, as well as a 'getposition' event listener. See code: vrview.on('click', (e) => {
vrview.getPosition() // call in click event
}
vrview.on('getposition', (e) => {
console.log(`Yaw: ${e.Yaw}. Pitch: ${e.Pitch}.`)
} Hope this helps! |
My code already does that and it's still not working! It doesn't even run through my function when I all getPosition(). I've got it hosted here:
|
I've moved to http://photo-sphere-viewer.js.org/ now and it has fixed all the problems I was having with vrview. When you click on the photo, it tells you the coordinates you clicked (not the camera view), and more importantly, it works without a problem. The features are a lot more sophisticated than vrview, and all round better job done of it. |
When does the 'getposition' event fire?
The code snippet below doesn't seem to trigger. It was copied and slightly modified from the hotspot example (https://googlevr.github.io/vrview/examples/hotspots/index.html).
I am currently self-hosting using the minimized files from https://github.com/googlevr/vrview#downloading-files
Thanks
The text was updated successfully, but these errors were encountered: