repo: janusweb
action: commit
revision: 
path_from: 
revision_from: 39d498dc5ff7684419a32f3b377f904621335aa0:
path_to: 
revision_to: 
git.thebackupbox.net
janusweb
git clone git://git.thebackupbox.net/janusweb
commit 39d498dc5ff7684419a32f3b377f904621335aa0
Author: James Baicoianu 
Date:   Thu Dec 22 03:36:15 2016 -0800

    Improved cursor logic for VR

diff --git a/scripts/janusbase.js b/scripts/janusbase.js
index 22976eaa54c593ef3b78499460762a2deaed1719..
index ..33bf2b18ba230800e2bce1ba9dc4dfa44c35dfe1 100644
--- a/scripts/janusbase.js
+++ b/scripts/janusbase.js
@@ -307,9 +307,10 @@ console.error('dunno what this is', other);
       });
     }
     this.updatePlayerCursor = function(ev) {
-      if (ev.type == 'mouseover' && this.onclick) {
+      var vrdisplay = this.engine.systems.render.views.main.vrdisplay;
+      if (ev.type == 'mouseover' && (this.onclick || elation.events.hasEventListener(this, 'click'))) {
         this.engine.client.player.cursor_style = 'pointer';
-      } else if (this.engine.systems.controls.pointerLockActive) {
+      } else if (this.engine.systems.controls.pointerLockActive || (vrdisplay && vrdisplay.isPresenting)) {
         this.engine.client.player.cursor_style = 'crosshair';
       } else {
         this.engine.client.player.cursor_style = 'default';

-----END OF PAGE-----