WASD movement

Blitz3D Forums/Blitz3D Programming/WASD movement

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Wouldn't work, Cruis.In. Let's say you put in a speed <= maxspeed with maxspeed = 4. The you press W to go up. You are now moving at 4 units up. Then, while holding down W, you press D. You should move up and right, but since any speed added to the object takes it above 4 units, you would continue to only move straight up, even though you had both keys down. The ONLY (I repeat ONLY) way to maintain a constant velocity when moving at non-divisible-by-90 angles is to use geometry. Without sine/cosine you have no way of knowing what portion of your maxspeed should be moved in the X direction and what portion should be in the Y, and you can't get around that because a computer monitor is nothing more than a grid of pixels.

So, sorry, but your suggestion would not work...