0

hello everyone,hope you can help me with this,
i want to work on a shooting game,and i already have a code for the rotation of the image but i have a few problem

First problem(for the tank /ship):

i want the image to AUTOMATICALLY rotate facing the mouse cursor,i know how to rotate but but i dont know how to convert the location of the mouse to an angle that the image will face,,

Second problem(for the bullets):

is there a simple code for an image to move from point A to point B like (50,29) to (77,55) ,,or just shoot the bullet from the tank to the angle that its facing,,

Hope you can help me,,Thanks to everyone who will read and reply..:)

2
Contributors
1
Reply
3
Views
8 Years
Discussion Span
Last Post by __avd
0

>Hope you can help me,,Thanks to everyone who will read and reply..

You can use TranslateTransform, RotateTransform() methods of graphics. I suggest you to read MSDN pages.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.