title: Trouble getting world position of object in THREE.js
body: <p>I'm currently trying to make a 'dungeon generator' - I have a set few Scene objects that each have an EntryNode, ExitNode and Room mesh inside of it. I'm having trouble setting the position of the Room object based on the previous' room ExitNode. </p>
  
  <p>The model is structured like so:</p>
  
  <pre><code>Scene
     L Entry_Node (instanceof THREE.Mesh) position: 0,0,0
     L Room (instaceof THREE.Group), positiom 0,0,23
        L (Several Children that are irrelevant)
     L Exit_Node position: 0,0,46
  </code></pre>
  
  <p>Rooms aren't guaranteed to be uniform in size or always be the same size, otherwise this would be simple. </p>
  
  <p>I'm currently creating a room like so: </p>
  
  <pre class="lang-js prettyprint-override"><code>_generateRoom(name) {
      let room = common.assets.model(name);       // Returns THREE.Scene with EntryNode, Room and ExitNode as children
  
      const entryNode = room.children.find(e =&gt; e.name.startsWith('Node_Entry'));
      const exitNode = room.children.find(e =&gt; e.name.startsWith('Node_Exit'));
  
      return [room, entryNode, exitNode];
  }
  </code></pre>
  
  <p>And I'm <em>trying</em> to attach multiple of these rooms like so: </p>
  
  <pre class="lang-js prettyprint-override"><code>_preGenerate(count) {
      let rooms = [];
      for (let i = 0; i &lt; count; i++) {
          const room = this._generateRoom('endless_straight3'); // Returns an array as [Room, EntryNode, ExitNode]
          this._stage.add(room[0]);
  
          room[0].updateMatrixWorld();
          if (rooms.length &gt; 0) {
              this._exitNode.updateMatrixWorld(true);
              this._exitNode.getWorldPosition(room[0].position);
          } else {
                  room[0].position.setScalar(0);
          }
          this._exitNode = room[2];
  
          console.log(room[0].position);
          rooms.push(room);
      }
  }
  </code></pre>
  
  <p>However, the issue is that at <code>this._exitNode.getWorldPosition(room[0].position);</code> - it always returns (seemingly) the local postion of the exit node - <code>THREE.Vector3(0, 0, 46)</code></p>
  
  <p>I expect it to return the position of the exit node based on the world position - so 46 for the first room, 92 for the second room, 138 for the third, and so on. 
  Not sure what's going wrong here, any help is appreciated!</p>
  
  <p>cc. <a href="https://discourse.threejs.org/t/trouble-getting-world-position-of-object/7540" rel="nofollow noreferrer">https://discourse.threejs.org/t/trouble-getting-world-position-of-object/7540</a></p>