Hi again all,

I have a question on how to set the position of the camera behind the players actor, at the moment i am simply using the following code:
[pascal]
var
p,v,u: Array [0..2] Of Single;
begin
....
p := Cameras.PlayerCam.Position; {Position of the Camera}
v := Players[0].Position; {Position of the player/model}
u := Vertex3f(0, 4, 0); {Up vector}
glLoadIdentity;
gluLookat(p, v, u);
....
end;
[/pascal]

The model uses a position and rotation vertex to set its position and rotation and neither of the Y axis are used!

Of course at the moment the camera doesnt rotate around the player depending on the players rotation, i have tried adding the players rotation to the v vertex and/or to the p vertex but this only effects the X axis and not the Y axis.
I want the camera to stay behind the players model.
For an idea of what i mean i have drawn a diagram:

Figs 1 and 2 are what i want but fig 3 is what i get
[Note: the diagram is crap, hope its understandble]



Here is a link to a current build of my app so show whats happening:
http://www.biocoders.org/XShell.zip - (4505kb)
Controls:
Up,Down,Left and Right to move the players model around,
Numpad + and -,
Use ESC to skip through each intro scene and to exit app.

The app requires some registry settings which i have included in the zip, theses settings are stored in the software/biocoders section.

A key will also need to be updated:
HKEY_CURRENT_USER\Software\BioCoders\XShell\Direct ory
Set this value you to the directory where XShell.exe has been extracted.

Also the app takes a while to load the actor model and skins after the 3rd intro screen..

Be warned its only a test app and hasnt got anything special!

Thanx for any help