Can someone explaine why i can not click on my hotspot’s. I thought that it was because in my hotspot.js there is a line about pc.MOUSEBUTTON_LEFT event but I thought it would not matter because the controller is also a mouse event? But if it has to be different how can i call the ride line for the controller?
I’ve tried something with this but I cannot figure this out:
this.entity.on(‘controller:button:click’, this._onButtonClick, this);
You are combining two sets of scripts that weren’t designed to work together without modification.
The VR input code is designed handle all the different input types from the various VR controllers (Cardboard/Screen touch, gamepad, VR controllers etc) whereas the hotspot code is listening for a different set of events from it’s own input controllers (mouse and touch).
If this is predominately for VR, would modify the hotspot code to listen for the events from the VR input controller scripts.
…
Than I changed the function for the mouse input to this:
…
Hotspot.prototype.onButtonClick = function (sourceEntity) {
this.doRayCast(event);_
};
…
But it is not working. De pointer in VR is working do but unfortunately not the click function.
@yaustar I’m running into the same problem, can you please explain how the input logic work for VR? I can’t seem to understand only looking at the example