ThatOpen / engine_components

MIT License
349 stars 134 forks source link

WebXR Camera issue #401

Closed ThisIsMonta closed 5 months ago

ThisIsMonta commented 5 months ago

Describe the bug 📝

Since openbim-components uses camera-controls package, enabling xr makes the camera gray.

Normal camera with FirstPerson mode enabled :

image

WebXR camera enabled:

image

Also after some research, i found out that i have to make a separate camera to enable WebXR for camera-controls package Issue#109.

So is there a way to add a Default threejs camera to the world.camera ?

Reproduction ▶️

No response

Steps to reproduce 🔢

No response

System Info 💻

System:
  OS: Windows 10 10.0.19045
  CPU: (12) x64 Intel(R) Core(TM) i5-10400F CPU @ 2.90GHz
  Memory: 6.75 GB / 15.94 GB
Binaries:
  Node: 20.11.0 - C:\Program Files\nodejs\node.EXE       
  npm: 10.2.4 - C:\Program Files\nodejs\npm.CMD
Browsers:
  Chrome: 125.0.6422.113
  Edge: Chromium (123.0.2420.97)
  Internet Explorer: 11.0.19041.4355

Used Package Manager 📦

npm

Error Trace/Logs 📃

No response

Validations ✅

agviegas commented 5 months ago

Hi @ThisIsMonta! You can create your own custom camera and add it to the world. The only requirement is that it extends the BaseCamera abstract class. If you have any issues with this, let us know! Closing this for now, as this should allow you to create a camera that fulfill your needs.