Consider checking in `getClosestTargetElements()` if `#rig` is not at origin anymore then take into account that offset when measure the distance.
See https://github.com/aframevr/aframe/issues/5182
Tested by doing jxr qs #rig sa position 0 0 10 then at that position jxr qs #rig sa position 0 0 0 to go back, which worked, but introduced a vertical offset. Might be related to the adjust-height-in-vr component but probably not as it's only done once entering VR.
Specifically `getClosestTargetElement()` in pinch related events kind of works :
```javascript
selectedElement = getClosestTargetElement(
document.querySelector("#rig").object3D.position.add(event.detail.position )
)
```
Tested by doing `jxr qs #rig sa position 0 0 10` then at that position `jxr qs #rig sa position 0 0 0` to go back, which worked, but introduced a vertical offset. Might be related to the `adjust-height-in-vr` component but probably not as it's only done once entering VR.
Consider checking in
getClosestTargetElements()
if#rig
is not at origin anymore then take into account that offset when measure the distance.See https://github.com/aframevr/aframe/issues/5182
Specifically
getClosestTargetElement()
in pinch related events kind of works :Tested by doing
jxr qs #rig sa position 0 0 10
then at that positionjxr qs #rig sa position 0 0 0
to go back, which worked, but introduced a vertical offset. Might be related to theadjust-height-in-vr
component but probably not as it's only done once entering VR.