简体   繁体   English

与框架中的点相交

[英]Intersection with points in aframe

since the point's is just a 3d coordinate. 因为该点只是3D坐标。 It is very hard to intersect with it by cursor or mouse. 用光标或鼠标与它相交是非常困难的。 But in three.js(here is an example https://threejs.org/examples/webgl_interactive_points.html ). 但是在three.js中(这是一个示例https://threejs.org/examples/webgl_interactive_points.html )。 The mouse can intersect with points very sensitive. 鼠标可以与非常敏感的点相交。 Is there any solution in aframe for this problem? 有没有解决这个问题的办法? Thank you very much. 非常感谢你。

A-Frame has a mouse-based raycaster mode. A-Frame具有基于鼠标的光线投射器模式。 Have you tried that? 你有尝试过吗?

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

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

Then add the event listeners and handlers, etc ( https://aframe.io/aframe-school/#/10 ) 然后添加事件侦听器和处理程序等( https://aframe.io/aframe-school/#/10

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM