diff --git a/src/components/spawn-controller.js b/src/components/spawn-controller.js index 4513c54ff953626aa08a7dc8fe0b5dcd64de1753..eab8314c8664965cbdd2b19acf99fa74609052c5 100644 --- a/src/components/spawn-controller.js +++ b/src/components/spawn-controller.js @@ -19,6 +19,8 @@ AFRAME.registerComponent("spawn-controller", { const angleDeg = angleRad * THREE.Math.RAD2DEG; const angleToCenter = -1 * angleDeg + 90; el.setAttribute("rotation", { x: 0, y: angleToCenter, z: 0 }); + + el.object3D.updateMatrix(); }, getPointOnCircle(radius, angleRad) { diff --git a/templates/room.hbs b/templates/room.hbs index 92b4d9250bb8c33a054792719f072d168b487fdc..db42fd7c9577ffef66ffc8dcd0cc98023c69ff83 100644 --- a/templates/room.hbs +++ b/templates/room.hbs @@ -109,6 +109,7 @@ <a-entity id="player-rig" networked + spawn-controller="radius: 4;" character-controller="pivot: #head" > <a-sphere scale="0.1 0.1 0.1"></a-sphere> @@ -119,7 +120,6 @@ personal-space-bubble look-controls networked="template: #head-template; showLocalTemplate: false;" - spawn-controller="radius: 4" ></a-entity> <a-entity