Sign in to follow this  
  • entries
    4
  • comments
    3
  • views
    1605

Rotation and terrain following

Sign in to follow this  
jizzah

232 views

For the last week I have been concerned with finding a way for the tank to follow the terrain. This was complicated by the fact that I totally forgot all my Linear Algebra and I really didn't know where to start. So I basically did what I have always done when I was at that point - start my browser and goto Google. After searching for the topic I wanted I really didn't find anything so what did I do at this point? I headed to my internal library of about 100 books on programming and Windows programming, and game programming. And still I didn't find anything in this collection so what did I do now? I went to Borders. On a sidenote I think Borders really messed up when they introduced chairs and sofas into their establishment. It just makes people read the books and magazines on the spot as if its a library? I mean they must have a lot of damage books and magazines. Anyways back to my problem. So what did I decide to do?

Well I tried to look at the problem from a bigger perspective. I decided to use a plane a normal plane defined in 3d space. Then I took the surface normal of this plane and then determined the amount of rotation to get from my perspective normal angles of x,y, and z axis. This took me almost a week just because I really had to study back up on vector and matrix multiplication, dot and cross products. I actually now have a tank that follows the terrain :) I am way more then excited as I was almost ready to give up again, on a game project. What usually happens is I get to a point I get stuck at, but my partner, my son, helped me with the special type of motivation he does.

I'm going to get some screen shots and also get some videos for everyone to see. I'm more then excited about this as this was a major sticking point. But see what you can do with a little ingeniuty and determination? Also sorry about the lack of updates you know Battlefield 2 came out. And I was going to check on my World of Warcraft guild and got a damn authentication error again.

Also you can actually view a DivX version of the tank tracking the terrain here. It weighs in at 6.5M.
Sign in to follow this  


1 Comment


Recommended Comments

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now