Hi,
i have a problem with the Skydome.java describted in the wiki:
http://www.jmonkeyengine.com/wiki/doku.php?id=skydome
first of all there is a compile error: atan2 needs two arguments
solarAzimuth = FastMath.atan2(opp / adj);
i fix this with
solarAzimuth = FastMath.atan(opp / adj);
I run the TestSkydome class, and everything seems ok (sun position and sky texture fits and i have a lens flare)
When i walk in the scene the skydome is following me, but the position of the sun in the scene not.(key b shows the bounding spheres, the best way to see the position)
The animation of the suns position goes on, but the position is not on the Skydome-Sphere. The sun leaves the dome or is in the middle of it if i approach or walk away.
So the sun position does not follow me, i don't understand why . . .
the scenegraph from the example is like this:
rootNode
L-->terrain
L-->skydome
L---> dome
L--->sun
L---> flare
L---> sunbox
in method simpleUpdate from TestSkydome class the position is changed when the camera moves.
In update method of Skydome class the position is been set:
dome.setLocalTranslation(new Vector3f(cameraPos.x, 0.0f, cameraPos.z));
I don't understand why the sun is not set relative to dome/skydome position. I have just copy and paste the code from the wiki, is that like it should be ? :? :?
What can i do to change this ?
greetings
Sebastian