aframevr / aframe-inspector

:mag: Visual inspector tool for A-Frame. Hit *<ctrl> + <alt> + i* on any A-Frame scene.
https://aframe.io/aframe-inspector/examples/
MIT License
654 stars 201 forks source link

Raycast triggers click event on invisible elements #569

Closed MartijnEisses closed 5 years ago

MartijnEisses commented 5 years ago

I've set a click event on multiple objects in my scene. When I click on an object in the inspector this triggers the click event, in my case this opens a web page which is quite annoying since I just want to click on the object and move it like in the previous version.

This isn't a big problem but when I click on an invisible object (material.visible = false) this also triggers the click event even though A-Frame's documentation says it should ignore invisible objects

Visible | Whether material is visible. Raycasters will ignore invisible materials.

ngokevin commented 5 years ago

When I click on an object in the inspector this triggers the click event, in my case this opens a web page which is quite annoying.

Should set pause handler to remove events when Inspector is open.

This isn't a big problem but when I click on an invisible object.

I can fix to not raycaster non-visible objects. Not sure about material.visible objects, three.js updated the behavior before.

ngokevin commented 5 years ago

https://github.com/aframevr/aframe-inspector/commit/82e6b618123958a193eb2c158aa2c66e8071ef14