Im just trying to simulate a tank kinda thing and ive ran into another problem. Im trying to get the position of the barrel of the tank no matter how its rotated.
This is my code for getting the barrels position currently
For a given turrnent length len, and origin (position of the center or the turrent), (x, y), the end of the barrel will be:
(x + len*cos(angle), y + len*sin(angle)) where angle is the angle of the turrent in radians.