0
votes

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

1 Answers

0
votes

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.