For debug im using:
Code:
procedure Debug_ShowGeometryCollision(const Body: PNewtonBody; VertexCount: Integer; const FaceArray: PFloat; FaceId: Int); cdecl;
var
i: Integer;
v0,v1: TVector3f;
vA: Array Of Single;
begin
If VertexCount = 0 Then Exit;
SetLength(vA, VertexCount*3);
Move(FaceArray^, vA[0], VertexCount*3*SizeOf(Single));
v0[0] := vA[(VertexCount-1)*3];
v0[1] := vA[(VertexCount-1)*3+1];
v0[2] := vA[(VertexCount-1)*3+2];
For i := 0 To VertexCount-1 Do
Begin
v1[0] := vA[i*3];
v1[1] := vA[i*3+1];
v1[2] := vA[i*3+2];
glVertex3f(v0[0], v0[1], v0[2]);
glVertex3f(v1[0], v1[1], v1[2]);
v0 := v1;
End;
end;
procedure Debug_ShowBodyCollision(const Body: PNewtonBody); cdecl;
begin
NewtonBodyForEachPolygonDo(Body, Debug_ShowGeometryCollision);
end;
Sorry my bad, completly forgot :s
forward=W
backward=S
turn left=A
turn right=D
run=SHIFT
Quit=ESC
Regenerate terrain=F1
Bookmarks