AFrame - 从相机保险丝中排除实体

AFrame - exclude Entity from camera Fuse

你们中有人知道从相机保险丝中排除实体的可能性吗???

我想使用融合光标来触发点击事件,但我仍然不希望光标融合在每个实体上。 我确信有可能做我想做的事……但我找不到去那里的路。 o0

https://aframe.io/docs/0.4.0/components/cursor.html#configuring-the-cursor-through-the-raycaster-component

The cursor builds on top of and depends on the raycaster component. If we want to customize the raycasting pieces of the cursor, we can do by changing the raycaster component properties. Say we want set a max distance, check for intersections less frequently, and set which objects are clickable:

https://aframe.io/docs/0.4.0/components/raycaster.html#whitelisting-entities-to-test-for-intersection

To select or pick the entities we want to test for intersection, we can use the objects property. If this property is not defined, then the raycaster will test every object in the scene for intersection. objects takes a query selector value:

<a-cursor raycaster="objects: .clickable"></a-cursor>
<a-box class="clickable"></a-box>

只是为了让人们知道...如果您在实体中使用光线投射器和光标,则需要在光标之前设置光线投射器:

<a-entity raycaster="objects: .clickable" cursor> 成功了!

<a-entity cursor raycaster="objects: .clickable"> 不要!