This made the chase cam concept work better. It's still not quite how I want it though:

// Update camera positions
camera.x = panzer.x - 50 * cos(player.pan);
camera.y = player.y - 15 * sin(player.pan);
camera.z = panzer.z + 25; // Position relative to tank's z position
// Set camera tilt and pan in order to look at the tank.
camera.tilt = panzer.tilt -15;
camera.pan = panzer.pan;

Now I've got to figure out how to ensure force is only applied in the direction the tank is facing for forward/backward movement...

EDIT: Silly me, once again. Changing "...player.y - 15..." to "...player.y - 50..." has fixed the camera. Ok, camera problem solved.

But I still can't get the vector for forward movement working right.... It pushes the tank in the direct +/-x direction of the world, not the tank, or it just does nothing if I change things...

Last edited by Jaeger; 05/19/09 12:43.