///////////////////////////////
#include <acknex.h>
#include <default.c>
///////////////////////////////
VECTOR mond_winkel;
//ENTITY* erde;
ENTITY* mond;
function earth();
function main()
{
vec_set(screen_size,vector(800,400,0));
vec_set(screen_color,vector(50,1,1)); // dark blue
vec_set(sky_color,vector(50,1,1)); // dark blue
video_window(NULL,NULL,0,"My New Game");
d3d_antialias = 1;
shadow_stencil = 3;
level_load(NULL);
me = ent_create ("box.mdl",vector(0,0,0),earth);
}
function earth()
{
mond = ent_create ("box2.mdl",vector(0,0,0),NULL);
while(1)
{
my.pan += 1*time_step;
vec_set(mond.x,vector(130,0,0)); // Distanz zur Erde (+ Radii der Körper)
vec_rotate(mond.x,mond_winkel); // <- diesen Befehl suchst du offenbar
vec_add(mond.x,me.x);
mond_winkel.x += 2*time_step;
mond_winkel.x %= 360;
mond_winkel.y = sinv(mond_winkel.y)*15; // herumexperimentieren!
mond.pan+= 6*time_step;
wait(1);
}
}