In an attempt to enhance my VR scene, I am following a tutorial on adding controllers using OBJ models. I wanted to use custom OBJ models in place of the default line pointers but encountered a loading issue where they either took too long to load or didn't load at all.
...
var gun = new OBJLoader();
gun.load('models/CA-87.obj');
this.controllers = [];
...
for (let i = 0; i < 2; ++i) {
const controller = renderer.vr.getController(i);
//controller.addEventListener('select', selectListener);
//controller.addEventListener('selectstart', selectListener);
//controller.addEventListener('selectend', endListener);
scene.add(controller);
controller.add(gun);
this.controllers.push({controller, gun});
}
...
I encountered the following errors: "THREE.Object3D.add: object not an instance of THREE.Object3D. > Object { manager: {…}, materials: null }". The expectation was to see these custom models integrate into the scene and respond to the movements of the vive controllers being used, but unfortunately, they did not appear as intended.