Der Post ist nur auf Englisch verfügbar

Camera trouble

Yesterday, I got the camera working. That was much more difficult than I ever thought, so first of all the easy stuff. I realised that my code to generate normal vectors was wrong, it produced normal vectors at the wrong locations. The problem was that I accessed the array that contained these vectors to get them in a different fashion than when I made them. Now this is fixed, both versions access the array in the same way.

Cameras were extremely difficult, mostly because I thought I could do things better than it was presented in a tutorial I was using. I had severe lag, only caused by my camera code, and troubles with turning up and down - after long phases where I would not see anything on screen at all. My final version is functionally nearly identical to the one described in this tutorial from gamedev.net and works fine.

A note if you want to implement your own Quaternion-based camera: People say it’s a huge advantage that quaternions do all rotations at once. I believed this and made all my rotation with only a single quaternion. The result was that the rotations were done in the wrong order, in the order the user specified them. You’ll want different variables for rotation around y and rotation around x or z axis, so that you can specify the order of the rotation by hand.

So, now I’m looking into Newton (looks scary) and ODE (heard people say that it’s scary) and try to figure out how to let that snow mobile actually drive on that map.

Geschrieben am 24. August 2005 um 17:21

0 Kommentare

    New comments can no longer be posted because it got to annoying to fight all the spam.