• Advertisement

Archived

This topic is now archived and is closed to further replies.

Traveling along a 2D vector?? (HELP!)

This topic is 5495 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey, Can anyone help me out here? Since I am from a design backgroud, my programming skills suck, so please don't laugh if this is a simple problem (it is also 2.10am here, and I haven't had any coffee for hours!) I am programming a 2D racing game using SDL (similar to Mirco Machines or the origional GTA), and in it I have the players vehicle. I am using 8 directions for the car, so at the moment, when I press the left or right key it does a 45 degree turn. What I am now stuck on is how to get the car to travel back and forth along the vector of this direction. At the moment, it only turns, I don't even have any vector code in (as I am not sure how to do it) but once that is in the game should get much easier from here on in to code. (p.s. I am using Dev-C++ & SDL, so no Win32 code please!) Thanks! http://tane.cream.org [edited by - Tane on February 1, 2003 9:30:22 PM]

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement