Thanks for the answer!
I've looked at the webvr.xml the 'vrcontroller_target_point', but the calculations used there don't seem to return the correct values in my js plugin.
Am I using the right krpano hotspot variables?
Also the distance (hitd) is always 0 for some reason.
I'm using Oculus GO headset with Firefox reality browser installed for remote debugging. I'm testing this on 'webvr-controllers' pano.
And here's the relevant piece of code:
|
Source code
|
1
2
3
4
5
6
7
8
9
|
var controllers = krpano.get("webvr.vrcontrollers");
var mainController = controllers[0];
var distance;
if(mainController.hs.hitd > 0)
distance = mainController.hs.hitd;
else
distance = 1000;
var clickX = mainController.hs.tx + mainController.hs.dx * distance;
var clickY = mainController.hs.ty + mainController.hs.dy * distance;
|