0

I am playing around with the WebGL Globe and have got it to rotate, but can't figure out how to position it so that it is not in the center of the scene.

I have altered the code at https://code.google.com/r/fxnstyling-webgl-globe-autospin/source/browse/ to be:

mesh = new THREE.Mesh(geometry, material);
    mesh.position = new THREE.Vector3(1000, 500, 300)
    mesh.matrixAutoUpdate = false;
    scene.addObject(mesh);

How can I change the position of the globe?

gman
  • 100,619
  • 31
  • 269
  • 393
imperium2335
  • 23,402
  • 38
  • 111
  • 190

1 Answers1

0

You have matrixAutoUpdate set to false, so the position isn't going to be updated until you explicitly call update again. Try calling mesh.updateMatrix() when you need the position to be updated.

brbcoding
  • 13,378
  • 2
  • 37
  • 51
  • Thanks! I also found out that it was actually the camera that was moving around the globe and that the globe wasn't rotating at all XD – imperium2335 Nov 10 '14 at 18:45