-
If your sprite is of length (x axis) n and height (y axis) m, then cx = n/2, cy = m/2, x = x_tank and y=y_tank are where you want the center of the tank to be on the big bitmap, and angle should be atan((x_tank-x_mouse)/(y_tank-y_mouse)). Don't forget to boundary check since you may divide by 0, which gives an infinite which actually makes sense (atan(infinity) = pi/2 radians).
And then there is Death
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules