I am getting really weird results in my program the shows Projectiles using Direct_X. Basically when I set the angle to 37 degrees, the ball goes further than when I set the angle to 45 degrees, yet it should go furtherest with 45.
This is how I am working it out:
I don't know what causes this error.Code:ball.movex = 50 * cos(angle*3.14159265/180); ball.movey = 50 * sin(angle*3.14159265/180); ball.movex *= 0.1; ball.movey *= -0.1; //then in the game loop ball.x += ball.movex; ball.y += ball.movey; if (keep going...) ball.movey -= 0.98;



LinkBack URL
About LinkBacks



CornedBee