Translate and rotate planete in three js

I am programming solar system using three Js. The sun is in the middle, i would like to use translate to position the planets.

var moongeometry = new THREE.SphereGeometry( 0.5, 5, 5 );

 var moonMaterial = new THREE.MeshPhongMaterial({

 map: THREE.ImageUtils.loadTexture("textures/mercury_texture.jpg")


var moon = new THREE.Mesh(moongeometry, moonMaterial);

moon.position.x += 5;

moon.translate(0.5,0.5, 0.5);



I am not able to see it.

1 Like

I believe you apply translation to the actual geometry, so use moongeometry.translate instead

And also you are not using the right methods such as moon.scale and moon.translate.

I suggest you read this

1 Like

Have you seen this from the Collection of examples from ? 2019
2021-06-03 08.25.51

1 Like