Ok, time for a BUMP.

I got the third person camera working, but there's still one thing I can't work out. I mean, mouse looking in the third person mode. The code I'm using works perfectly in the first person mode, but when it's used with the latter, it produces an effect like, well, a "barrel roll"? Here's a picture for a better look at the situation:


And of course, the code:
[code=delphi]
procedure TBrainCamera.MouseLook(const CursorX, CursorY: Integer);
var
DeltaX, DeltaY: Single;
R: TBrainEuler;
begin
if (CursorX = CenterX) and (CursorY = CenterY) then
exit;

DeltaX := CenterX - CursorX;
DeltaY := CenterY - CursorY;

R := Rotation; // for convenience
R.Yaw := R.Yaw - DeltaX * FMouseSmooth;

if FInvert then
R.Pitch := R.Pitch - DeltaY * FMouseSmooth
else
R.Pitch := R.Pitch + DeltaY * FMouseSmooth;

if (R.Pitch < FMinAngle) then
R.Pitch := FMinAngle;
if (R.Pitch > FMaxAngle) then
R.Pitch := FMaxAngle;

Rotation := R;

if (FCamType = ctThirdPerson) and (Assigned(FTarget)) then
FTarget.Rotation := Euler(FTarget.Rotation.Pitch, R.Yaw,
FTarget.Rotation.Roll);

SetCursorPos(CenterX, CenterY);

UpdateNeeded := True;
UpdateInvNeeded := True;
end;
[/code]

Does anyone have a slightest clue what is wrong there?