Java 3D: making a sphere rotate like a planet.
843799Mar 27 2006 — edited Mar 27 2006Hey guys, could anyone possible show me to make a spher rotate on its axis, like a plant? I'm fairly new to java 3d.
Sphere sp = new Sphere(.4f, Sphere.GENERATE_TEXTURE_COORDS, earthApp);
t.set(1.0, new Vector3d(0f, 0f, 0f));
TransformGroup tg1 = new TransformGroup(t);
tg1.addChild(sp);
mainTG.addChild(tg1);
That basically puts a sphere in the middle of the screen, earthApp references a file called earth.JPG which colours the sphere to make it look like the earth.
But i need help rotating it guys!