Hi,
i have write a code who rotate a cube "cube2" in relation of another cube "cube1"...
action rotate_cube()
{
while(1)
{
cube1.pan += 20 * (key_a - key_d) * time_step;
cube2.pan = cube1.pan + temp ;
if(cube1.pan > temp + 45)
{
temp += 45;
}
if(cube1.pan < temp - 45)
{
temp -= 45;
}
wait(1);
}
}
so if i rotate the cube1 to 45 degree or more, the cube2 are rotated to 45 degree...ect
But there my question.. how to make the second cube to rotate smoothly to the desired angle?
thx