repo: janusweb action: commit revision: path_from: revision_from: 8703b7d0d88a6102c77edfbbccffda505ab5e17e: path_to: revision_to:
commit 8703b7d0d88a6102c77edfbbccffda505ab5e17e Author: James BaicoianuDate: Wed Apr 24 17:14:12 2019 -0700 Workaround for ndefined player position diff --git a/scripts/janusplayer.js b/scripts/janusplayer.js
--- a/scripts/janusplayer.js
+++ b/scripts/janusplayer.js
@@ -343,6 +343,10 @@ elation.require(['engine.things.player', 'janusweb.external.JanusVOIP', 'ui.butt
this.updateVectors = function() {
var v = this.vectors;
if (this.objects['3d']) {
+ let playerpos = this.properties.position;
+ if (typeof playerpos.x == 'undefined' || isNaN(playerpos.x)) playerpos.x = 0;
+ if (typeof playerpos.y == 'undefined' || isNaN(playerpos.y)) playerpos.y = 0;
+ if (typeof playerpos.z == 'undefined' || isNaN(playerpos.z)) playerpos.z = 0;
this.objects['3d'].updateMatrix();
this.objects['3d'].updateMatrixWorld();
this.objects['3d'].matrixWorld.extractBasis(v.xdir, v.ydir, v.zdir)
-----END OF PAGE-----