Following this question
AFRAME screen to world position
I can get the position of the vector, but it seems to be very close to camera, how do I get it around 100px further away from the camera?
let mouse = new three.Vector2()
let camera = AFRAME.scenes[0].camera
let rect = document.querySelector('body').getBoundingClientRect()
mouse.x = ( (e.clientX - rect.left) / rect.width ) * 2 - 1
mouse.y = - ( (e.clientY - rect.top) / rect.height ) * 2 + 1
let vector = new three.Vector3( mouse.x, mouse.y, -1 ).unproject( camera )
this.el.setAttribute('vector',vector)
this.data.onVector(this.data.sceneId,vector)
this._removeListener()
I tried multiplying the values from mouse etc and setting the z access to further away, but that doesn't seem to make any difference