-
Notifications
You must be signed in to change notification settings - Fork 1.1k
VR Mode: Reticle / Fuse button / Hotspot 'virtual' click #145
Comments
I had the same issue using Google Chrome 57 on a Nexus 5. Thanks! |
Same thing using latest version on iOS. The docs are not clear how we should proceed when VR mode is true. Thanks. |
@transpirman its easy, you have function HotspotRenderer.prototype.focus_ , there you can put some setTimeout and add logic if it focus more than 1 sec or whatever do this
|
Thank you for the code. Actually I started building on that already, but encountered a problem for which I found a workaround. I will try to post code asap. The problem : when hotspots are created, the 'update' function in renderer emits a focus event, and no blur event. |
@transpirman it will help to you this.hotspots[id].show check it before settimeout in focus |
@fix2015 Oh thank you for the tip ! I did not think of it. What I did so far in hotspot_renderer: 2°) HotspotRenderer.prototype.add = function(pitch, yaw, radius, distance, id, image, is_stereo) { // Tween scale of hotspot. // Virtual Click (todo: real fuse button) I will try to create a proper 'pull request' once I get how to fully use GitHub :-) Now, any idea about the reticle not showing up ? |
@transpirman i found the reason, just need change this in package.json and rebuild
|
for the reticle, uncomment https://github.com/googlevr/vrview/blob/master/src/embed/world-renderer.js#L279 |
The false calling of focus that happens when a hotspot is added can be stopped by moving this line https://github.com/googlevr/vrview/blob/master/src/embed/world-renderer.js#L64 two lines down so it is under "this.effect.render..." This fix is also needed: https://github.com/googlevr/vrview/pull/158/files Then, adding to the code from fix2015: ( hotspot-renderer.js )
These changes (and the reticle enabled) are in the branch named "gaze" here. (will do a pr soon) https://github.com/tommytee/vrview/blob/gaze/src/embed/hotspot-renderer.js |
Hi,
I tried the hotspot example in VR mode (Google Chrome on S7 Edge)
When I gaze at any hotspot, the white circle grows but I do not see any recticle.
I would also like to activate a short timer so gazing at hotspot would trigger a click after a few second (like a "fuse button" as described here: https://www.google.com/design/spec-vr/interactive-patterns/controls.html#).
Is there a way to do that ?
Do someone have code examples of how to capture these events like Hotspot onFocus, etc...
Thanks !
The text was updated successfully, but these errors were encountered: