camera control in car game

Started by
1 comment, last by henryx 22 years, 5 months ago
Hi, I''m looking for some ideas on controlling a third person camera in an F1 type racing game that I am currently working on. I have a number of possible camera views, but in the one I am currently working on, I have the camera position behined the car looking over the car and onto the road in front of the car. This is great and works well when the car is on a straight bit of road, but the problems arise when the car comes to a corner. I have tried a few things such as swinging the camera round behined the car as it travels round the corner - this seems resonable but does lead to lots of camera code. Basically, my question is this - does anybody know of any cool methods/algorithms for controling the movement of the camera in this type of game. There must be lots of good methods out there since there are many racing games such as f1 2000 etc which have really good camera control. Any good ideas appreciated. thanks henry
HenryLecturer in Computer Games TechnologyUniversity of Abertay DundeeScotlandUK
Advertisement
Consider putting the camera on a spring. Game programming gems has (as usual) a good description (and a demo) of this. (at least I THINK it was GPG)

Edited by - meZmo on November 13, 2001 1:10:42 PM
That spring effect you were talking about is realy just a simple line of code.

Plug this in to your camera code:

CameraPos += ((CarPos - CameraPos) / 16.0f);

Play with 16.0f to ge some differect effects.

This topic is closed to new replies.

Advertisement