I have a question concerning touch detection on ar objects. I use A-Frame with Ar.js
In my Project, I have a globe which can be rotated. Now I wanna add country-specific "markers", which should also be objects.
I tried:
AFRAME.registerComponent('markerhandler', {
init: function() {
const animatedMarker = document.querySelector("#hiro");
const aEntity = document.querySelector("#globe");
animatedMarker.addEventListener('click', function(ev, target){
console.log("hi")
});
But I just recognized the click event anywhere on the display ...
I also tried using a raycaster from a-frame, but also with no detection :(
Has anyone a better idea/reference projects?