This has probably been asked before but here goes anyways:
The traditional method for moving objects using sin and cos lets you have more than 32 degrees. Fair enough, but it still doesn't cover every pixel on the screen. I'm currently using this code for a little mouse controled shooter but there are still quite a few angles that my bullets wont go to. In some cases, its not noticable since my bullets have a degree of inaccuracy but in the case of the sniper rifle, its HIGHLY noticable.
I think the degree of accuracy has something to do with the 'speed' you multiply the cos(angle)/sin(angle) by, but thats the only way that I know of to make bullets more/less accurate. Does anyone know a better way to do shooting?
anyways i seemed to have fixed it slightly. Apparently using an alterable variable to store the x and y positions to move the bullet to before moving it makes it more accurate.... i have no idea why.
Yeah, I was about to tell you to do that. You have to calculate and store the current position in variables, because otherwise it'll calculate the position properly but round it out when the object is placed. So the formula is working but future calculations are ignoring previous fractions.