for (var i = 0; i < 10; i++) {
var playerBoidLine = [];
playerBoidLine.push(xr.baseExperience.camera.position); //likely a vector3
playerBoidLine.push(
models[i].getBoundingInfo().boundingSphere.center //returns a vector3 for sure
);
//lineStorage.push(playerBoidLine);
console.log(playerBoidLine);
var lines = BABYLON.MeshBuilder.CreateLines("lines", {points: playerBoidLine}, scene);
}
I believe that the xr.baseExperience etc. is a vector3
I know that the models[i] etc. is vector3
So, why can’t I make a line?
I’m trying to create a helper f(x) in my vr world so that all players can see which robots are owned by all other players (a little white line, maybe dashed, will connect them).
Here’s my error:
TypeError: this._scene.getUniqueId is not a function
at t.e (babylon.js:16)
at t [as constructor] (babylon.js:16)
at t [as constructor] (babylon.js:16)
at t [as constructor] (babylon.js:16)
at new t (babylon.js:16)
at Function.e.CreateLineSystem (babylon.js:16)
at Function.e.CreateLines (babylon.js:16)
at Function.e.CreateLines (babylon.js:16)
at (index):1551
at t._renderFrame (babylon.js:16)
XRSession$1..onDeviceFrame @ VM2080:1284
requestAnimationFrame (async)
requestAnimationFrame @ VM2080:36505
XRSession$1..startDeviceFrameLoop @ VM2080:1293
XRSession$1 @ VM2080:1367
requestSession @ VM2080:944
async function (async)
requestSession @ VM2080:943
CustomWebXRPolyfill.XRSystem.requestSession @ VM2080:37020
e.initializeSessionAsync @ babylon.js:16
e.enterXRAsync @ babylon.js:16
(anonymous) @ babylon.js:16
(anonymous) @ babylon.js:16
(anonymous) @ babylon.js:16
(anonymous) @ babylon.js:16
s @ babylon.js:16
Promise.all.then.e.forEach.o._buttons..element.onclick @ babylon.js:16