【问题标题】:Intersection with points in aframe与框架中的点相交
【发布时间】:2017-08-11 08:45:49
【问题描述】:

因为该点只是一个 3d 坐标。光标或鼠标很难与它相交。但是在三个.js(这里是 一个例子https://threejs.org/examples/webgl_interactive_points.html)。鼠标可以与非常敏感的点相交。框架中有没有解决这个问题的方法?非常感谢。

【问题讨论】:

    标签: javascript three.js aframe


    【解决方案1】:

    A-Frame 具有基于鼠标的光线投射器模式。你试过吗?

    https://aframe.io/docs/0.6.0/components/cursor.html#properties_rayorigin

    <a-entity cursor="rayOrigin: mouse">

    然后添加事件监听器和处理程序等(https://aframe.io/aframe-school/#/10

    例如:http://aframevr.github.io/aframe/examples/showcase/link-traversal

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-05-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-03-21
      • 1970-01-01
      相关资源
      最近更新 更多