Click here to Skip to main content
15,899,679 members
Home / Discussions / C#
   

C#

 
GeneralRe: start text from required word Pin
Sajjad Leo27-Mar-09 2:40
Sajjad Leo27-Mar-09 2:40 
GeneralRe: start text from required word Pin
Yusuf27-Mar-09 3:49
Yusuf27-Mar-09 3:49 
QuestionFormatting excel file column Pin
CodingLover26-Mar-09 22:48
CodingLover26-Mar-09 22:48 
AnswerRe: Formatting excel file column Pin
SeMartens26-Mar-09 22:49
SeMartens26-Mar-09 22:49 
NewsRe: Formatting excel file column Pin
CodingLover26-Mar-09 22:53
CodingLover26-Mar-09 22:53 
GeneralRe: Formatting excel file column Pin
SeMartens26-Mar-09 23:05
SeMartens26-Mar-09 23:05 
GeneralRe: Formatting excel file column Pin
CodingLover26-Mar-09 23:16
CodingLover26-Mar-09 23:16 
Questionxna first person shooter: strafing Pin
James_72226-Mar-09 21:08
James_72226-Mar-09 21:08 
I am creating a (first person shooter)-ish video game for my comp. sci. class and I can't get my character to strafe properly. I can have it move forwards and backwards but not side to side (at least not relative the the object, only the world). here is the code to move the object forward.

if (keyboardState.IsKeyDown(Keys.W))
            {
               
                
                Vector3 pos = GetMissileMuzzlePosition();
                missileLauncherHead.velocity = missileLauncherHead.position - new Vector3(pos.X, 0, pos.Z);
                missileLauncherBase.velocity = new Vector3(0.0f, 0.0f, 0.0f);
                missileLauncherHead.position -= missileLauncherHead.velocity;
                missileLauncherBase.position -= missileLauncherBase.velocity;
            }

and here's the code to make the object (its a cannon at this point) move to the left.
if (keyboardState.IsKeyDown(Keys.A))
            {
                 Vector3 pos = GetMissileMuzzlePosition();
                Vector3 refer = new Vector3(missileLauncherHead.position.X + 5,     missileLauncherHead.position.Y,missileLauncherHead.position.Z);
                missileLauncherHead.velocity = refer - missileLauncherHead.position;
                missileLauncherBase.velocity = new Vector3(5.0f, 0.0f, 0.0f);
                missileLauncherHead.position -= missileLauncherHead.velocity;
                missileLauncherBase.position -= missileLauncherBase.velocity;
            }


I a complete noob when it comes to vectors. I literally just learned how to do this in my calculus/vectors couse a few weeks back.
AnswerRe: xna first person shooter: strafing Pin
Christian Graus26-Mar-09 21:56
protectorChristian Graus26-Mar-09 21:56 
GeneralRe: xna first person shooter: strafing Pin
James_72227-Mar-09 2:56
James_72227-Mar-09 2:56 
QuestionHow to read files using FolderBrowserDialog and save its contents into sql database table Pin
Nopo26-Mar-09 21:03
Nopo26-Mar-09 21:03 
AnswerRe: How to read files using FolderBrowserDialog and save its contents into sql database table Pin
King Julien26-Mar-09 21:49
King Julien26-Mar-09 21:49 
GeneralRe: How to read files using FolderBrowserDialog and save its contents into sql database table Pin
Nopo26-Mar-09 23:19
Nopo26-Mar-09 23:19 
GeneralRe: How to read files using FolderBrowserDialog and save its contents into sql database table Pin
King Julien26-Mar-09 23:59
King Julien26-Mar-09 23:59 
GeneralRe: How to read files using FolderBrowserDialog and save its contents into sql database table Pin
Nopo27-Mar-09 1:42
Nopo27-Mar-09 1:42 
GeneralRe: How to read files using FolderBrowserDialog and save its contents into sql database table Pin
King Julien27-Mar-09 3:48
King Julien27-Mar-09 3:48 
GeneralRe: How to read files using FolderBrowserDialog and save its contents into sql database table Pin
0x3c027-Mar-09 4:39
0x3c027-Mar-09 4:39 
AnswerRe: How to read files using FolderBrowserDialog and save its contents into sql database table Pin
Giorgi Dalakishvili26-Mar-09 22:38
mentorGiorgi Dalakishvili26-Mar-09 22:38 
QuestionCall event after closing my last form but not the main form? Pin
lixid26-Mar-09 19:02
lixid26-Mar-09 19:02 
AnswerRe: Call event after closing my last form but not the main form? Pin
King Julien26-Mar-09 19:35
King Julien26-Mar-09 19:35 
GeneralRe: Call event after closing my last form but not the main form? Pin
lixid26-Mar-09 19:56
lixid26-Mar-09 19:56 
GeneralRe: Call event after closing my last form but not the main form? Pin
King Julien26-Mar-09 20:18
King Julien26-Mar-09 20:18 
GeneralRe: Call event after closing my last form but not the main form? Pin
lixid27-Mar-09 20:09
lixid27-Mar-09 20:09 
QuestionNeed help with some basic problems Pin
RogerLum26-Mar-09 17:37
RogerLum26-Mar-09 17:37 
AnswerRe: Need help with some basic problems Pin
Dave Kreskowiak26-Mar-09 18:14
mveDave Kreskowiak26-Mar-09 18:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.