Skip to main content
GameDev.net gamedev.net
🔒 Locked

strafing

Started by baldurk Nov 20, 2000 at 2:55 AM 5 replies 1k views
Original Post
baldurk
baldurk
I have made a simple strafing func, either adding 90 or 270 degrees to the direction youre facing. thats not the problem. the problem is, how do I use the ALT key to strafe? its not in the MSDN Docs, (I think)
Quantum
Quantum
Do you mean the way quake(and a lot of FPS's too) did how you hold down alt and pushing the left or right arrow keys strafed instead of turning? Easy, when you check if the left or right keys are down, check if alt is down, if it is strafe, otherwise turn.

Edited by - Quantum on November 20, 2000 4:17:29 AM
CyberBotX
CyberBotX
Actually, he means about just using ALT as either strafe left or strafe right. I used to set up Q2 to have SHIFT as strafe left and Numpad-0 as strafe right. But, I do not know how to do that in C++.
tcs
tcs
not in MSDN, lol ;-)))) Probably the most basic information ever...

Just look for WM_KEYDOWN and the documentation that''s in the keyboard section of the SDK
Tim--------------------------glvelocity.gamedev.netwww.gamedev.net/hosted/glvelocity
Rainmaker
Rainmaker
Doesn''t it include a right alt and left alt version?
NeoGL
NeoGL
check for VK_MENU, that''s how I do it. To get the right and left Alt (if there is one), do a F12 on VK_MENU, it will take you to the file (winuser.h), look for the other key codes there.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.