Your matrix multiplication code is wrong
Here's the right version
[pascal]
function MultiplyMatrix(m, w: Tmatrix4FC): Tmatrix4FC;
var
x, y, i: integer;
begin
for x := 0 to 3 do
for y := 0 to 3 do
begin
result.arr[x,y] := 0;
for i := 0 to 3 do
result.arr[x, y] := result.arr[x, y]+ m.arr[x, i] * w.arr[i, y];
end;
end;
[/pascal]
I couldn't figure the orientation out. You might need to transpose the result