Normal
Ich moechte einen Planeten um eine Sonne rotieren lassen.Jedoch kriege ich die Rotation nicht ganz hin.Hier ist mein Code zum Rotieren:[code]a = (float) (a + .00001) ; planet1.xpos = (float) (Math.cos(a) * planetarray_sundistance[1] + sun.xpos); planet1.ypos = (float) (Math.sin(a) * planetarray_sundistance[1] + sun.ypos);[/code]
Ich moechte einen Planeten um eine Sonne rotieren lassen.
Jedoch kriege ich die Rotation nicht ganz hin.
Hier ist mein Code zum Rotieren:
[code]a = (float) (a + .00001) ;
planet1.xpos = (float) (Math.cos(a) * planetarray_sundistance[1] + sun.xpos);
planet1.ypos = (float) (Math.sin(a) * planetarray_sundistance[1] + sun.ypos);[/code]