aframe vector unproject not working and not sure?bug?

走远了吗. 提交于 2020-01-06 05:25:12

问题


I try used threejs to test out simple 3D plane without mesh object just zero plane base on camera with unproject and it work. But I try on Aframe it didn't work and there is bug.

getInverse > m.elements error that it show on the console log.

Here simple example of Aframe. https://gist.github.com/Lightnet/8fb3d4a7c5f3ed2b3865bf894aecb9b8

Any way to solve this?


回答1:


You shouldn't perform your operations on the camera = document.querySelector('[camera]');, because it grabs the a-frame's wrapper around the three camera.

You can access the three camera with camera.components.camera.camera.
As noted, You can also grab it by the reference AFRAME.scenes[0].camera.

Check it out on this fiddle.



来源:https://stackoverflow.com/questions/48371678/aframe-vector-unproject-not-working-and-not-surebug

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!