如何设置“对象”? raycaster组件中的属性 [英] how to set "objects" property in aframe raycaster component
问题描述
我想使用< a-cursor>
实体中的 raycaster
组件与某些
相交
我将 objects
属性设置为 #box(我的多维数据集的ID),但光标仍然
与所有元素相交。
我进入raycaster源代码,而 data.objects
是''
。
那么,我想知道我是否以错误的方式设置了属性?
I want to use raycaster
component in <a-cursor>
entity to intersect some
cubes.
I set the objects
property like '#box' (my cube's id), but the cursor still
intersects all element.
I step into the raycaster source code, and the data.objects
is ''
.
So, I wonder if I set the property in a wrong way?
推荐答案
有一个错误在具有依赖项组件的A框架中。它已在开发版本中修复: https://github.com/ aframevr / aframe / tree / master / dist#dev-builds ,并将以0.4.0发行。
There was a bug in A-Frame with dependency components. It's been fixed in the Dev Builds: https://github.com/aframevr/aframe/tree/master/dist#dev-builds and will be released with 0.4.0.
一种解决方法是将raycaster组件置于光标之前:
A workaround is to put the raycaster component before the cursor:
<a-entity raycaster="..." cursor="..."></a-entity>
这篇关于如何设置“对象”? raycaster组件中的属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!