Mail Archives: djgpp/1998/03/14/01:47:25
On Sun, 01 Mar 1998 15:52:17 -0800, Dan <dyoon AT home DOT com> wrote:
> float radian_angle = (angle*180)/PI;
>the ship starts off with the front of the ship pointing north, so the
>ship's "angle" variable starts off at 90.
>so if i just press the up arrow key from the
>start of the game, the ship should go up the screen? instead it goes at
>some weird angle.
>
Your conversion looks backwards: if angle is degrees, then you need to
multiply by (radians/degrees) to convert it to radians. Try
float radian_angle = angle * (PI/180);
Christopher Webb
cwebb at ctos.com
- Raw text -